v1.62.0 breaks `--build.bin` backwards compatibility
I am running:
# air --build.bin "appname cmdname"
It is erroring while previously it used to work with v1.61.7
/bin/sh: /go/src/github.com/orgname/appname/appname cmdname: not found
it happens on my project as well, suddenly my docker won't work when I rebuild the container
downgrade to RUN go install github.com/air-verse/[email protected] fixed this issues
[build]
bin = "./tmp/main serve --config config_local.yaml"
cmd = "go build -o ./tmp/main ."
Same for me, downgraded for now.
Moving args to args_bin solved the issue for me:
[build]
bin = "tmp/main"
args_bin = ["args"]
Possibly introduced by this commit? https://github.com/air-verse/air/commit/a830e5a27ac354edcd6c6d190dd678a78bc06035
Also broke in my project.
Before Update (broken):
[build]
bin = "./tmp/main app serve"
Working after update
[build]
full_bin = "tmp/main app serve"
I think this breaking change was done to make file paths with spaces work. The shell tries to execute the entire bin as a path with spaces, but the error message No such file or directory which the shell gives is pretty confusing to user's updating especially so because the current readme provides an unrelated fix for the issue.
I think full_bin is the same as the old functionality and might not work for users with spaces in their directory, so using args as recommended by the above comments is probably better.
Do you still have this issue in the latest version of air?
https://github.com/air-verse/air/issues/824 see this issue.