esc icon indicating copy to clipboard operation
esc copied to clipboard

Make it clear why dotenv and shell formats can't be used with property paths

Open komalali opened this issue 9 months ago • 3 comments

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.

komalali avatar Feb 26 '25 07:02 komalali

I think the reason it does this is it depends on the environmentVariables map to know what names to give the values

nyobe avatar Feb 26 '25 16:02 nyobe

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.

komalali avatar Feb 26 '25 21:02 komalali

I was also confused by this initially 😅

I think we could support this for paths into the environmentVariables key, though?

nyobe avatar Feb 27 '25 05:02 nyobe