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

.env-cmdrc syntax error but prompts 'Error: Failed to find .rc file at default paths' #354

Open
xiangnanscu opened this issue Nov 3, 2022 · 1 comment

Comments

@xiangnanscu
Copy link

    This confused me because I thought env-cmd couldn't find my configuration file, since that was the only error I saw. It turned out it was an error in my configuration code causing the issue. I'd definitely suggest outputting any errors to the console.

Originally posted by @alflennik in #127 (comment)

@xiangnanscu
Copy link
Author

for example, you place some invalid content in .env-cmdrc like this:

{"base":{"num": 20 * 3 * 40}}

and you run env-cmd -e base echo bla, it says Error: Failed to find .rc file at default paths: [./.env-cmdrc,./.env-cmdrc.js,./.env-cmdrc.json], but in fact the file exists, its content is just invalid

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

1 participant