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

environments and file options may be mutually exclusive #372

Open
abacaphiliac opened this issue Jan 22, 2024 · 1 comment
Open

environments and file options may be mutually exclusive #372

abacaphiliac opened this issue Jan 22, 2024 · 1 comment

Comments

@abacaphiliac
Copy link

Great tool, use it every day, thank you!

I got tripped up today by using -e with -f. The tool throws a generic error about a missing .rc file:

Error: Failed to find .rc file at default paths: [./.env-cmdrc,./.env-cmdrc.js,./.env-cmdrc.json]

Turns out that you need to use -e with -r, something that I do know and have used many times in the past but forgot for some reason today.

Is it true to say that -e can only be used with -r? Is it true to say that you'd never use -f with -r? If so, i'm thinking we might be able to provide a more helpful error message to let folks know their options are invalid in a very specific way.

Thanks for the consideration! Happy to help if this sounds useful.

@toddbluhm
Copy link
Owner

toddbluhm commented Dec 3, 2024

Yes, -e and -r are mutually exclusive.

I am considering simplifying the options as I think that they have become a bit unwieldy. Maybe just a single -f which can point to either .rc or .env file and then depending on if you pass in a -e it would assume that -f is an .rc file at that point, otherwise assume its a .env.

Thoughts?

Also feel free to contribute a PR to improve the error messaging around the current syntax.

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

2 participants