Commit Graph
2 Commits
Author SHA1 Message Date
Luke ArmsandJordan Harband 1875fe8b40 [Fix] avoid OpenBSD nvm install error when /sbin/init doesn't exist
`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.
2021-12-26 15:31:53 +11:00
Luke ArmsandJordan Harband 81f0f3ec19 [Fix] set -E: Add test for node install on Bash with an ERR trap and set -E 2021-12-27 16:02:25 +11:00