Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default not supported for gopass #251

Open
Stausssi opened this issue Feb 7, 2024 · 0 comments
Open

Default not supported for gopass #251

Stausssi opened this issue Feb 7, 2024 · 0 comments

Comments

@Stausssi
Copy link

Stausssi commented Feb 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant