|
96 | 96 | # It should favor .profile if file exists |
97 | 97 | NVM_DETECT_PROFILE="$(unset SHELL; nvm_detect_profile)" |
98 | 98 | if [ "$NVM_DETECT_PROFILE" != "$HOME/.profile" ]; then |
99 | | - die "nvm_detect_profile should have selected .profile" |
| 99 | + die "nvm_detect_profile should have selected .profile; got $NVM_DETECT_PROFILE" |
100 | 100 | fi |
101 | 101 |
|
102 | 102 | # Otherwise, it should favor .bashrc if file exists |
103 | 103 | rm ".profile" |
104 | 104 | NVM_DETECT_PROFILE="$(unset SHELL; nvm_detect_profile)" |
105 | 105 | if [ "$NVM_DETECT_PROFILE" != "$HOME/.bashrc" ]; then |
106 | | - die "nvm_detect_profile should have selected .bashrc" |
| 106 | + die "nvm_detect_profile should have selected .bashrc; got $NVM_DETECT_PROFILE" |
107 | 107 | fi |
108 | 108 |
|
109 | 109 | # Otherwise, it should favor .bash_profile if file exists |
110 | 110 | rm ".bashrc" |
111 | 111 | NVM_DETECT_PROFILE="$(unset SHELL; nvm_detect_profile)" |
112 | 112 | if [ "$NVM_DETECT_PROFILE" != "$HOME/.bash_profile" ]; then |
113 | | - die "nvm_detect_profile should have selected .bash_profile" |
| 113 | + die "nvm_detect_profile should have selected .bash_profile; got $NVM_DETECT_PROFILE" |
114 | 114 | fi |
115 | 115 |
|
116 | 116 | # Otherwise, it should favor zdotdir/.zprofile if file exists |
117 | 117 | rm ".bash_profile" |
118 | 118 | NVM_DETECT_PROFILE="$(unset SHELL; nvm_detect_profile)" |
119 | 119 | if [ "$NVM_DETECT_PROFILE" != "$ZDOTDIR/.zprofile" ]; then |
120 | | - die "nvm_detect_profile should have selected zdotdir/.zprofile" |
| 120 | + die "nvm_detect_profile should have selected zdotdir/.zprofile; got $NVM_DETECT_PROFILE" |
121 | 121 | fi |
122 | 122 |
|
123 | 123 | # Otherwise, it should favor .zprofile if file exists |
124 | 124 | rm "zdotdir/.zprofile" |
125 | 125 | NVM_DETECT_PROFILE="$(unset SHELL; unset ZDOTDIR; nvm_detect_profile)" |
126 | 126 | if [ "$NVM_DETECT_PROFILE" != "$HOME/.zprofile" ]; then |
127 | | - die "nvm_detect_profile should have selected .zprofile" |
| 127 | + die "nvm_detect_profile should have selected .zprofile; got $NVM_DETECT_PROFILE" |
128 | 128 | fi |
129 | 129 |
|
130 | 130 | # Otherwise, it should favor zdotdir/.zshrc if file exists |
131 | 131 | rm ".zprofile" |
132 | 132 | NVM_DETECT_PROFILE="$(unset SHELL; nvm_detect_profile)" |
133 | 133 | if [ "$NVM_DETECT_PROFILE" != "$ZDOTDIR/.zshrc" ]; then |
134 | | - die "nvm_detect_profile should have selected zdotdir/.zshrc" |
| 134 | + die "nvm_detect_profile should have selected zdotdir/.zshrc; got $NVM_DETECT_PROFILE" |
135 | 135 | fi |
136 | 136 |
|
137 | 137 | # Otherwise, it should favor .zshrc if file exists |
138 | 138 | rm "zdotdir/.zshrc" |
139 | 139 | NVM_DETECT_PROFILE="$(unset SHELL; unset ZDOTDIR; nvm_detect_profile)" |
140 | 140 | if [ "$NVM_DETECT_PROFILE" != "$HOME/.zshrc" ]; then |
141 | | - die "nvm_detect_profile should have selected .zshrc" |
| 141 | + die "nvm_detect_profile should have selected .zshrc; got $NVM_DETECT_PROFILE" |
142 | 142 | fi |
143 | 143 |
|
144 | 144 | # It should be empty if none is found |
145 | 145 | rm ".zshrc" |
146 | 146 | NVM_DETECT_PROFILE="$(unset SHELL; nvm_detect_profile)" |
147 | 147 | if [ ! -z "$NVM_DETECT_PROFILE" ]; then |
148 | | - die "nvm_detect_profile should have returned an empty value" |
| 148 | + die "nvm_detect_profile should have returned an empty value; got $NVM_DETECT_PROFILE" |
149 | 149 | fi |
150 | 150 |
|
151 | 151 | cleanup |
0 commit comments