Closed goldcaddy77 closed 4 years ago
@goldcaddy77, how’s it going! Super busy at the moment so I probably won’t have a chance to look into this anytime soon.
Hey, long time! Any chance you could take a look and point me in the right direction? We're currently pinning at an old version because we use the optional
feature.
Bah, it looks like I introduced a bug with my recursive support: https://github.com/b3ross/dotenvi/blob/master/src/rewriter.ts#L36
Now I rely on the value existing when returned from a resolver.
One simple fix I think would be to pass in to rewriteValue
whether the variable is optional (should be available in the InputDocument
), and if so, don't throw an exception.
We should also add a test case for handling optionals here: https://github.com/b3ross/dotenvi/blob/bfccb6aa1b4d042411cad6133f8ee717a0085eb1/src/rewriter.test.js#L22
Let me know if that doesn't makes sense ☝️
Ahhh, gotcha - just saw #50 - thanks for the quick turnaround!
Version:
Running the following command:
yarn dotenvi -s development
yields the following error: