Skip to content

Config file not working? #718

Closed
Closed

Description

@ainsleyclark

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

Activity

  1. PThorpe92 commented on Dec 16, 2024

    @PThorpe92

    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.

  2. christiangda commented on Dec 16, 2024

    @christiangda

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

    Screenshot 2024-12-16 at 21 26 04
  3. bradj commented on Dec 16, 2024

    @bradj

    I am experiencing this as well.

    ➜ air -v
    
      __    _   ___
     / /\  | | | |_)
    /_/--\ |_| |_| \_ v1.61.4, built with Go go1.23.3 X:loopvar
    
  4. lucasquin commented on Dec 16, 2024

    @lucasquin

    I have the same issue here

  5. nemanja-m commented on Dec 16, 2024

    @nemanja-m
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions