esc
esc copied to clipboard
Make it clear why dotenv and shell formats can't be used with property paths
Actual
When attempting either:
esc env open org/proj/env path.to.key --format dotenv
or
esc env open org/proj/env path.to.key --format shell
we see the errors:
Error: output format 'dotenv' may not be used with a property path
or
Error: output format 'shell' may not be used with a property path
Expected
I should be able to do the above if path.to.key points to an object.
I think the reason it does this is it depends on the environmentVariables map to know what names to give the values
Yeah I realized after I dug into it further. I think it would be helpful to give a better error so that's clear to the user.
I was also confused by this initially 😅
I think we could support this for paths into the environmentVariables key, though?