air icon indicating copy to clipboard operation
air copied to clipboard

pre_cmd fails

Open petereichinger opened this issue 10 months ago • 3 comments

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

petereichinger avatar Apr 01 '24 23:04 petereichinger

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

petereichinger avatar Apr 01 '24 23:04 petereichinger

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.

RedCrazyGhost avatar Apr 07 '24 14:04 RedCrazyGhost

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

Linkinlog avatar May 21 '24 14:05 Linkinlog