mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-08-19 12:03:43 +00:00
Compare commits
1 Commits
0641363102
...
68c08f55c1
Author | SHA1 | Date | |
---|---|---|---|
![]() |
68c08f55c1 |
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@ -1,6 +1,6 @@
|
||||
name: urchin tests
|
||||
|
||||
on: [push, pull_request]
|
||||
on: [push]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
@ -306,7 +306,7 @@ nvm_detect_profile() {
|
||||
if [ -z "$DETECTED_PROFILE" ]; then
|
||||
for EACH_PROFILE in ".profile" ".bashrc" ".bash_profile" ".zprofile" ".zshrc"
|
||||
do
|
||||
if DETECTED_PROFILE="$(nvm_try_profile "${ZDOTDIR:-${HOME}}/${EACH_PROFILE}")"; then
|
||||
if DETECTED_PROFILE="$(nvm_try_profile "${HOME}/${EACH_PROFILE}")"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
@ -23,7 +23,7 @@ cleanup () {
|
||||
unset -f setup cleanup die
|
||||
unset ZDOTDIR
|
||||
rm -f ".bashrc" ".bash_profile" ".zprofile" ".zshrc" ".profile" "test_profile" > "/dev/null" 2>&1
|
||||
rm -rf zdotdir 2>&1
|
||||
rm -rf zdot>&1
|
||||
}
|
||||
|
||||
die () { echo "$@" '$NVM_DETECT_PROFILE:' "$NVM_DETECT_PROFILE"; cleanup; exit 1; }
|
||||
@ -94,21 +94,21 @@ fi
|
||||
#
|
||||
|
||||
# It should favor .profile if file exists
|
||||
NVM_DETECT_PROFILE="$(SHELL= ZDOTDIR= nvm_detect_profile)"
|
||||
NVM_DETECT_PROFILE="$(SHELL= nvm_detect_profile)"
|
||||
if [ "$NVM_DETECT_PROFILE" != "$HOME/.profile" ]; then
|
||||
die "nvm_detect_profile should have selected .profile; got $NVM_DETECT_PROFILE"
|
||||
fi
|
||||
|
||||
# Otherwise, it should favor .bashrc if file exists
|
||||
rm ".profile"
|
||||
NVM_DETECT_PROFILE="$(SHELL= ZDOTDIR= nvm_detect_profile)"
|
||||
NVM_DETECT_PROFILE="$(SHELL= nvm_detect_profile)"
|
||||
if [ "$NVM_DETECT_PROFILE" != "$HOME/.bashrc" ]; then
|
||||
die "nvm_detect_profile should have selected .bashrc; got $NVM_DETECT_PROFILE"
|
||||
fi
|
||||
|
||||
# Otherwise, it should favor .bash_profile if file exists
|
||||
rm ".bashrc"
|
||||
NVM_DETECT_PROFILE="$(SHELL= ZDOTDIR= nvm_detect_profile)"
|
||||
NVM_DETECT_PROFILE="$(SHELL= nvm_detect_profile)"
|
||||
if [ "$NVM_DETECT_PROFILE" != "$HOME/.bash_profile" ]; then
|
||||
die "nvm_detect_profile should have selected .bash_profile; got $NVM_DETECT_PROFILE"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user