air-verse / air

☁️ Live reload for Go apps
GNU General Public License v3.0
16.38k stars 772 forks source link

[Question] How to prevent running web server when failed to compile? #503

Closed kokizzu closed 7 months ago

kokizzu commented 7 months ago

my config just like this:

root = "."

[build]
include_ext = ['go', 'html']
exclude_regex = ['_test.go']
exclude_dir = ['cache', 'backup', 'tmpdb', 'tmp', 'deploy', 'static', 'svelte/node_modules', 'svelte/assets']
delay = 500 

but when filed to compile, the webserver keep running causing pain when debugging "why my changes does not have effect" thingy

lukmdo commented 7 months ago

Did you try perhaps stop_on_error = true

root = "."

[build]
include_ext = ['go', 'html']
exclude_regex = ['_test.go']
exclude_dir = ['cache', 'backup', 'tmpdb', 'tmp', 'deploy', 'static', 'svelte/node_modules', 'svelte/assets']
delay = 500
stop_on_error = true

? or as air -build.stop_on_error true

kokizzu commented 7 months ago

ah that's how :3 thank you