Skip to content
Myr

nvm_has

This file

Path

test/fast/Unit tests/nvm_has

12 lines · 361 bytes

Last changed by

[Tests] set `$_` before sourcing `nvm.sh` in fast testsJordan Harbandbefore adoptionc451e7a

History of this file

Take 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–4why, one step back
1#!/bin/sh
23die () { echo "$@" ; exit 1; }4

[Tests] set `$_` before sourcing `nvm.sh` in fast testsJordan Harbandbefore adoptionc451e7a

line 5why, one step back
5: nvm.sh

[Dev Deps] update `markdown-link-check`Jordan Harbandbefore adoption5c12680

lines 6–12why, one step back
6\. ../../../nvm.sh
78nvm_has cat && type cat > /dev/null || die 'nvm_has locates "cat" properly'910[ "~$(nvm_has foobarbaz 2>&1)" = "~" ] || die "nvm_has does not suppress error output"1112! nvm_has foobarbaz && ! type foobarbaz >/dev/null 2>&1 || die "nvm_has does not return a nonzero exit code when not found"