nvm_install_dir
This file
Path
test/install_script/nvm_install_dir
25 lines · 677 bytes
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than 5c12680 point at it.
[Dev Deps] update `markdown-link-check`Jordan Harbandbefore adoption5c12680
lines 1–25why, one step back1#!/bin/sh23cleanup () {4 unset -f die cleanup5 unset install_dir6}7die () { echo "$@" ; cleanup ; exit 1; }89NVM_ENV=testing \. ../../install.sh10HOME="__home__"111213# NVM_DIR is set14NVM_DIR="some_dir"15install_dir=$(nvm_install_dir)16[ "_$install_dir" = "_$NVM_DIR" ] || die "nvm_install_dir should use \$NVM_DIR if it exists. Current output: $install_dir"1718unset NVM_DIR19# NVM_DIR is not set20install_dir=$(nvm_install_dir)21fallback_dir=""22[ ! -z "$XDG_CONFIG_HOME" ] && fallback_dir="$XDG_CONFIG_HOME/nvm" || fallback_dir="$HOME/.nvm"23[ "_$install_dir" = "_$fallback_dir" ] || die "nvm_install_dir should default to \$XDG_CONFIG_DIR/.nvm. Current output: $install_dir"2425cleanup