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

Config file not working? #718

Closed
ainsleyclark opened this issue Dec 16, 2024 · 5 comments · Fixed by #719
Closed

Config file not working? #718

ainsleyclark opened this issue Dec 16, 2024 · 5 comments · Fixed by #719

Comments

@ainsleyclark
Copy link

Similar to: #678

I'm not sure why but air -c .air.toml doesn't respect any of the settings within the config file.

Notice the bin arg here set to .tmp/WRONG here, I should expect an error but it just runs with the default settings.

However, when running inline, for example: air --build.args_bin "serve" it seems to work

root = "."
testdata_dir = "testdata"
tmp_dir = "tmp"

[build]
  args_bin = ["serve"]
  bin = "./tmp/WRONG"
  cmd = "templ generate && go build -o ./tmp/main ."
  delay = 1000
  exclude_dir = ["./web/assets", "tmp", "vendor", "testdata", "web/node_modules", "res", "cms"]
  exclude_file = []
  exclude_regex = ["_test.go"]
  exclude_unchanged = false
  follow_symlink = false
  include_dir = []
  include_ext = ["go", "tpl", "tmpl", "html"]
  include_file = []
  kill_delay = "0s"
  log = "build-errors.log"
  poll = false
  poll_interval = 0
  post_cmd = []
  pre_cmd = []
  rerun = false
  rerun_delay = 500
  send_interrupt = false
  stop_on_error = false

[color]
  app = ""
  build = "yellow"
  main = "magenta"
  runner = "green"
  watcher = "cyan"

[log]
  main_only = false
  silent = false
  time = false

[misc]
  clean_on_exit = false

[proxy]
  app_port = 3000
  enabled = true
  proxy_port = 3001

[screen]
  clear_on_rebuild = false
  keep_scroll = true
@PThorpe92
Copy link

Having this same issue here. Air seems to be checking tmp directory for the output binary despite bin being used in place, and watching directories explicitly ignored in the config file.

@christiangda
Copy link

I confirmed the same issue after I updated to v1.61.4

Screenshot 2024-12-16 at 21 26 04

@bradj
Copy link

bradj commented Dec 16, 2024

I am experiencing this as well.

➜ air -v

  __    _   ___
 / /\  | | | |_)
/_/--\ |_| |_| \_ v1.61.4, built with Go go1.23.3 X:loopvar

@lucasquin
Copy link

I have the same issue here

@nemanja-m
Copy link
Contributor

I encountered the same issues and created a fix for the bug introduced in v1.61.4, detailed in the linked PR.

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

Successfully merging a pull request may close this issue.

6 participants