Skip to content

Commit 7baae9c

Browse files
committed
Merge pull request #78 from tromey/fix-issue-33
test $EMACS directly rather than using "which"
2 parents c9c7871 + ee171df commit 7baae9c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

run_rust_emacs_tests.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,21 @@
1414

1515
if [ -z "$EMACS" ]; then
1616
EMACS=emacs
17-
elif [ ! $(which "$EMACS") ]; then
17+
fi
18+
19+
$EMACS --batch || {
1820
echo "You must set EMACS to a program that runs emacs."
1921
exit 1
20-
fi
22+
}
2123

22-
$( "$EMACS" -batch > /dev/null 2>&1 ) || {
24+
$( $EMACS -batch > /dev/null 2>&1 ) || {
2325
echo "Your emacs command ($EMACS) does not run properly."
2426
exit 2
2527
};
2628

27-
$( "$EMACS" -batch --eval "(require 'ert)" > /dev/null 2>&1 ) || {
29+
$( $EMACS -batch --eval "(require 'ert)" > /dev/null 2>&1 ) || {
2830
echo 'You must install the `ert` dependency; see README.md'
2931
exit 3
3032
};
3133

32-
"$EMACS" -batch -l rust-mode.el -l rust-mode-tests.el -f ert-run-tests-batch-and-exit
34+
$EMACS -batch -l rust-mode.el -l rust-mode-tests.el -f ert-run-tests-batch-and-exit

0 commit comments

Comments
 (0)