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

stop_on_error should be default true #705

Open
yelodevopsi opened this issue Nov 18, 2024 · 0 comments
Open

stop_on_error should be default true #705

yelodevopsi opened this issue Nov 18, 2024 · 0 comments

Comments

@yelodevopsi
Copy link

It seems that the default [build].stop_on_error param (if not defined in .air.toml) is set to false?

Is there any particular reason for it?

I just ended up debugging for 3+ hours where the build seemingly worked ok, until I dug deeper in my verbose output log.
Using the "last known working binary" for hot-realoading and run it should not be the default imho.

Can this be changed? Thanks.

here's my current .air.toml if it is relevant.

# .air.toml

# Root directory
root = "."
tmp_dir = "tmp"

[build]
  # Command to build your project
  # Use .exe extension for Windows
  cmd = "swag init --parseDependency --parseInternal --parseDepth 1 && go build -o ./tmp/main.exe"

  # File extensions to watch for changes
  include_ext = ["go", "tpl", "tmpl", "html", "css", "js"]

  # Directories to exclude from watching
  exclude_dir = ["assets", "tmp", "vendor", "docs"]

  # Delay rebuild until changes have settled (in milliseconds)
  delay = 1000

  # Additional build flags (optional)
  build_flags = "-v"

  # Add this line to stop running the app on build error
  stop_on_error = true

[run]
  # Command to run your built binary
  # Use .exe extension for Windows
  cmd = "./tmp/main.exe"

  # Environment variables to set when running the binary
  env = ["APP_ENV=development"]

[color]
  main = "yellow"
  watcher = "cyan"
  build = "green"
  runner = "magenta"
  
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

1 participant