-
Notifications
You must be signed in to change notification settings - Fork 49
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
generated .env file stored in current directory #350
Comments
Hmm, when would this littering + forget scenario occur? The command is pretty explicit in that it creates a When would you prefer |
Please follow conventions of classic BSD or GNU tools unless you have a strong need to do differently.
|
Always :-) I could turn it around: When do you ever need to create a dot-file in current directory? You would only ever need it when you happen to stand in the root of a $HOME directory, where (conventionally) dot-files are stored. On a related note: using hidden files (i.e. classic dot-files beginning with a dot) is nowadaysdiscouraged and commonly replaced with non-hidden files below dot-folder |
What might make sense is to create the file at a well-defined path (and auto-create path directories if not existing, and fail if file already exist and some But is this really a config file? Seems to me more like a systemd env file - which is just one way out of several to pas options to a session, and therefore no default path is sensble, and therefore no path should be used by default: Emit to STDOUT by default (not to current directory!). |
(please imagine an "in my opinion" to all of my posts - you are of course welcome to do however you please with your project) |
Thanks for sharing your thoughts on this. I fully agree that following conventions should be the default, but I'm not sure if there's a convention for creating
That's not what That's why non-local things are stored in the But all of this is confusing, and not ideal. There are |
How do you know that most users are standing in the same directory as their atomic-server binary considers $HOME? I mean, if I do |
Let's maybe start at the beginning, then: What is .env files for? Your own help output states that .env files "shows various options that you can set". If the purpose of .env files is to show options that can be set, then please show it on screen (i.e. on stdout) not save it into a hidden file. If the purpose is not what you document, but instead what I guess - namely to be parsed by systemd service unit, then please save it at a deterministic path because systemd does not normally load such files from "current working dir" but from explicitly declared paths - see If the purpose is something third then please document what that purpose is, and we can restart this conversation then, when we both know what we are talking about... |
The Basically, I think most devs will like following these steps: cargo install atomic-server
# Generate .env file in current dir
atomic-server setup-env
# User modifies some settings
vim .env
# Server reads local `.env`
atomic-server
Well, showing isn't the purpose anymore (that was its original purpose indeed, but has changed since clap 3.0) - that's what the
Not typically, at least not what I thought. As you know I'm pretty new to |
Running command
atomic-server setup-env
stores a file with a specific name in current directory.I find that a bad default behaviour. There is a real risk of "littering" - i.e. forgetting about a generated file when standing somewhere random while issuing the command.
Please consider by default to emit that content to
STDOUT
, and introduce an optional argument--file
to redirect to a file.The text was updated successfully, but these errors were encountered: