elasticdog / transcrypt

transparently encrypt files within a git repository
MIT License
1.44k stars 102 forks source link

WIP Let user set a custom path to openssl #111

Closed jmurty closed 3 years ago

jmurty commented 3 years ago

This is work-in-progress. See #108

Add the optional --openssl-path argument when initialising a repo to tell transcrypt to use an explicit path to the openssl binary, instead of using whatever version is on the user's path.

The openssl path is now saved as a new transcrypt.openssl-path Git config local setting in the repository, alongside the other transcrypt settings like cipher, password etc.

If the user provides --openssl-path this explicit path is stored in the local Git config, otherwise the default value 'openssl' is stored which will fall back to the default behaviour of finding openssl on the user's $PATH.

The --openssl-path argument gets special treatment for upgrades: an --openssl-path argument value given along with --upgrade will replace the existing config setting, despite config settings normally being retained across upgrades.