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

Warn if tmp dir is the current working directory #42

Open
drshrey opened this issue Dec 24, 2019 · 2 comments
Open

Warn if tmp dir is the current working directory #42

drshrey opened this issue Dec 24, 2019 · 2 comments

Comments

@drshrey
Copy link

drshrey commented Dec 24, 2019

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"
@cosmtrek
Copy link
Owner

cosmtrek commented Jan 4, 2020

Thanks for your advice, it does make sense, I'll update the README.

@musinit
Copy link

musinit commented Apr 16, 2020

Maybe show it like this?
#64

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

3 participants