air
air copied to clipboard
pre_cmd fails
I created a basic air config with air init
.
Then i try to add a simple pre_cmd
before cmd
in the .air.toml
file:
pre_cmd = ["echo 'hello air' > pre_cmd.txt"]
Now air does not work anymore (config is not parsed correctly and only defaults are used see #516
What do I do wrong here?
I use version 1.51.0 and use NixOs
If anyone wants to see the code (i commented out the pre_cmd
) https://github.com/petereichinger/videoplayer . I currently run templ generate
using cmd as a workaround. pre_cmd would be preferable
I tried it on my side pre_cmd and it works fine on my side, .air.toml should be in the same directory as main.go.
Experiencing the same issue, I have my air.toml in my root directory with the main.go im trying to execute in cmd/client/main.go
using cmd = "go build -o ./tmp/main cmd/client/main.go"
.
Tested using the default as well, and without pre_cmd = ["echo 'hello air' > pre_cmd.txt"]
, everything works fine, with it however it seems to disregard my custom cmd
and fails saying there are no Go files in the directory