summon icon indicating copy to clipboard operation
summon copied to clipboard

Default not supported for `gopass`

Open Stausssi opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

Default values as they are now do not work with gopass as a provider. The reason (probably) being, that gopass does not return an empty string, as stated in the documentation of default values, but rather fails. The gopass log output

Error fetching variable MY_SECRET: exit status 11: Error: failed to retrieve secret "key/to/my/secret": entry is not in the password store

with secrets.yml:

MY_SECRET: !var:default='' key/to/my/secret

Describe the solution you would like

summon should also look at the exit code of the provider and use the default value in case of errors.

Describe alternatives you have considered

This could probably also be done using a custom provider wrapping gopass and returning an empty string on failure. However, this seems more like a workaround than a feature.

Additional context

Stausssi avatar Feb 07 '24 08:02 Stausssi