secrethub / secrethub-cli

A secrets management platform that every engineer can use with minimal code changes.
https://secrethub.io
Apache License 2.0
135 stars 23 forks source link

Fix op config dir lookup #378

Closed Marton6 closed 3 years ago

Marton6 commented 3 years ago

The current version of the migration tool only looks for the 1Password config file on the path ~/.op/config, this is, however a deprecated path, and the op cli uses other paths over this one, if possible.

The paths, ordered from lowest to highest priority are: ~/.op/config $XDG_CONFIG_HOME/config ~/config/.op $XDG_CONFIG_HOME/op

This PR fixes the issue, by using the same logic used by the op cli to determine the default config dir location.