Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre_cmd fails #565

Open
petereichinger opened this issue Apr 1, 2024 · 3 comments
Open

pre_cmd fails #565

petereichinger opened this issue Apr 1, 2024 · 3 comments

Comments

@petereichinger
Copy link

petereichinger commented Apr 1, 2024

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
Copy link
Author

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

@RedCrazyGhost
Copy link

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.

@Linkinlog
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants