diff --git a/main.go b/main.go index 23e3492..d0729bd 100644 --- a/main.go +++ b/main.go @@ -60,7 +60,7 @@ func init() { } func printHelp() { - fmt.Println("Usage: ./main -p= -t= [-c|--compress] [-v|--version=] [-component=] [-arch=] [-release=] [-platform=]") + fmt.Println("Usage: go run . -p= -t= [-c|--compress] [-v|--version=] [-component=] [-arch=] [-release=] [-platform=]") flag.PrintDefaults() fmt.Println("Example: go run . --upload -c --upload-path=./mozilla-central/obj-x86_64-pc-linux-gnu/dist/bin -a") os.Exit(0) diff --git a/spitfire/build.go b/spitfire/build.go index a35433a..ad98f10 100644 --- a/spitfire/build.go +++ b/spitfire/build.go @@ -20,9 +20,13 @@ func runCommand(command string, args ...string) error { // Function to resolve paths using absolute path func ResolvePath(path string) (string, error) { + // Convert Unix-style slashes to the platform's native slashes + path = filepath.FromSlash(path) + + // Get the absolute path absPath, err := filepath.Abs(path) if err != nil { - return "", fmt.Errorf("failed to resolve path: %s", path) + return "", fmt.Errorf("failed to resolve path: %s, error: %v", path, err) } return absPath, nil }