Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change which to command -v #532

Merged
merged 1 commit into from
Nov 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/n
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ check_current_version() {
for bin in ${BINS[@]}; do
if diff &> /dev/null \
$BASE_VERSIONS_DIR/$bin/$current/bin/node \
$(which node) ; then
$(command -v node) ; then
active=$bin/$current
fi
done
Expand Down Expand Up @@ -622,7 +622,7 @@ remove_versions() {
prune_versions() {
check_current_version
for version in $(versions_paths); do
if [ $version != $active ]
if [ "$version" != "$active" ]
then
echo $version
rm -rf ${BASE_VERSIONS_DIR[$DEFAULT]}/$version
Expand Down