Merge pull request #36 from ypid/use/ASDF_DIR_env_var

Use ASDF_DIR environment variable if available
This commit is contained in:
Daniel Perez 2017-05-06 19:08:00 +09:00 committed by GitHub
commit 53200f1fba
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ The `gpg` commands above imports the OpenPGP public keys in your main OpenPGP ke
To use a dedicated keyring, prepare the dedicated keyring and set it as the default keyring in the current shell:
```bash
export GNUPGHOME="$HOME/.asdf/keyrings/nodejs" && mkdir -p "$GNUPGHOME" && chmod 0700 "$GNUPGHOME"
export GNUPGHOME="${ASDF_DIR:-$HOME/.asdf}/keyrings/nodejs" && mkdir -p "$GNUPGHOME" && chmod 0700 "$GNUPGHOME"
# Imports Node.js release team's OpenPGP keys to the keyring
bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring

View File

@ -168,8 +168,8 @@ download_and_verify_checksums() {
fi
(
if [ -z "${GNUPGHOME:-}" ] && [ -d "$HOME/.asdf/keyrings/nodejs" ]; then
export GNUPGHOME="$HOME/.asdf/keyrings/nodejs"
if [ -z "${GNUPGHOME:-}" ] && [ -d "${ASDF_DIR:-$HOME/.asdf}/keyrings/nodejs" ]; then
export GNUPGHOME="${ASDF_DIR:-$HOME/.asdf}/keyrings/nodejs"
fi
if ! $gnugp_verify_command_name --verify "$signed_checksum_file"; then