You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the support for .env-cmdrc.js along with the --environments flag to allow me to do merging of environments within the environments file to avoid my scripts from getting too long.
Unfortunately it seems like there's a bug in env-cmd around resolving the fallback files. I can see where the code is set up to try and do that, but it fails on the first file.
Here's the error I get when trying to use env-cmd with a .env-cmdrc.js file in the same dir:
Error: Invalid .rc file path.
at Object.<anonymous> (C:\Users\tivac\Desktop\env-cmd-test\node_modules\env-cmd\dist\parse-rc-file.js:27:19)
at Generator.throw (<anonymous>)
at rejected (C:\Users\tivac\Desktop\env-cmd-test\node_modules\env-cmd\dist\parse-rc-file.js:5:65)
node@10.12.0
npm@6.9.0
env-cmd@9.0.3
The text was updated successfully, but these errors were encountered:
I've tracked down the problem. The problem is that https://github.com/toddbluhm/env-cmd/blob/master/src/get-env-vars.ts#L54 doesn't await the promise ever, which means it never catches the error. Additionally, env-cmd is being compiled for pre-Node v8, which is strange, seeing as how Node v6 is dead and v8 is going to EOL at the end of this year too.
Akkuma
added a commit
to Akkuma/env-cmd
that referenced
this issue
Jul 26, 2019
I'm trying to use the support for
.env-cmdrc.js
along with the--environments
flag to allow me to do merging of environments within the environments file to avoid myscripts
from getting too long.Unfortunately it seems like there's a bug in
env-cmd
around resolving the fallback files. I can see where the code is set up to try and do that, but it fails on the first file.I've created a repro as a gist
Here's the error I get when trying to use
env-cmd
with a.env-cmdrc.js
file in the same dir:The text was updated successfully, but these errors were encountered: