test-js-with-node: Fix searching for node binary

Previously, when the first `which` failed, the entire script would
fail with exist status 1 because we pass `-e` to the interpreter.

(imported from commit 601de3b3e3edd90110fc478f7874e644009d1b62)
This commit is contained in:
Zev Benjamin 2013-07-30 17:54:33 -04:00
parent 7637574345
commit e8112ff1c1
1 changed files with 1 additions and 4 deletions

View File

@ -2,10 +2,7 @@
cd "$(dirname "$0")"/../zephyr/tests/frontend/node
NODEJS=$(which nodejs)
if [ ! -x "$NODEJS" ]; then
NODEJS=$(which node)
fi
NODEJS=$(which nodejs || which node)
$NODEJS message_tour.js
$NODEJS unread.js