Permalink
Browse files

Bug fix

-Fixed commit where `js` was called directly instead of through `$JSBIN`
-further fixes issue micha/jsawk#21
  • Loading branch information...
1 parent c031fef commit 4546c5eeb06d3783e694b3e32c06598f403faeb8 @flamusdiu flamusdiu committed Oct 30, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 jsawk
View
2 jsawk
@@ -1315,7 +1315,7 @@ fi
JSBIN=${js_arg:-${JS:-js}}
ret=$?
-res=$(cat $TMP2 2>/dev/null | js $TMP1 $nlines "$@")
+res=$(cat $TMP2 2>/dev/null | $JSBIN $TMP1 $nlines "$@")
out=$(echo "$res" |sed '/^OUT: /s/^.....//p;d')
err=$(echo "$res" |sed '/^ERR: /s/^.....//p;d')

1 comment on commit 4546c5e

can be shorter:

out=$(echo "$res" |sed -n 's/^OUT:.//p;')
err=$(echo "$res" |sed -n 's/^ERR:.//p;')

Please sign in to comment.