0

From within the jshint directory running the following fails as expected:

env/jsc.sh ${REPO}/${FILE}

But when trying to add options, it passes:

env/jsc.sh ${REPO}/${FILE} "{browser:true}"

Am I setting the options correctly? The code it evaluates has a bad line intentionally added for testing purposes. Here is the bash script for loop where that line gets executed:

for FILE in `git diff-index --name-only ${against} -- | egrep *.js`; do
    cd ${JSHINT_HOME}

    env/jsc.sh ${REPO}/${FILE} "{browser:true}"

    EXIT_CODE=$((${EXIT_CODE} + $?))

done
Sam3k
  • 960
  • 1
  • 11
  • 22

1 Answers1

0

I was looking for the same thing, and found this Git pull request which suggests that options with curly braces are parsed weirdly, with the result that you see.

Drop the curly braces, and you'll probably get the result you expected.

tolien
  • 467
  • 2
  • 6
  • 15