air
air copied to clipboard
Warn if tmp dir is the current working directory
In .air.conf, if you set the tmp to ".", your entire current working directory will be wiped. This can be very bad especially if you haven't committed to git in a while. Can we have a warning if it is set to "." or atleast some documentation around that please?
My .air.conf that caused this:
# Working directory
# . or absolute path, please note that the directories following must be under root
root = "."
# Optional! If `watch_dir` is empty, use `root`.
watch_dir = ""
tmp_dir = "."
[build]
# Just plain old shell command. You could use `make` as well.
cmd = "go build"
# Binary file yields from `cmd`.
bin = "main"
Thanks for your advice, it does make sense, I'll update the README.
Maybe show it like this? https://github.com/cosmtrek/air/pull/64