[Fix] avoid OpenBSD `nvm install` error when /sbin/init doesn't exist
Before adoption: this commit came in with the history the project adopted, so no landing records it.
`nvm install` fails with "Binary download failed, trying source" when - running on Bash; - errtrace (`set -E`) is enabled; - an ERR trap uses `exit` to return a non-zero status; and - /sbin/init doesn't exist. Resolved by moving `ls -dl /sbin/init` to the following `if` statement. In this context, returning non-zero isn't an error and the ERR trap isn't executed.
authored by Luke Arms · committed by Jordan Harband · parent 81f0f3e · Browse files · 1 file+5 added−3 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+5 added−3 removed
- other:+5 added−3 removed