diff --git a/lib/azure-scripty.js b/lib/azure-scripty.js index 07abff1..d6c9e3b 100644 --- a/lib/azure-scripty.js +++ b/lib/azure-scripty.js @@ -142,6 +142,7 @@ exports.exec = function exec(cmd, callback) { catch(parsing_error) { callback(parsing_error,stdout); + return; } } callback(undefined,json); diff --git a/test/azure-scripty.coffee b/test/azure-scripty.coffee index 28361d8..7b79b7a 100644 --- a/test/azure-scripty.coffee +++ b/test/azure-scripty.coffee @@ -15,7 +15,7 @@ scripty.exec = (cmd, callback) -> calls++; receivedCmds.push(cmd); if expectedCmds.length > 0 - cmd.should.include expectedCmds.pop() + cmd.should.containEql expectedCmds.pop() callback errors.pop(), results.pop() describe 'scripty', -> diff --git a/test/mocha.opts b/test/mocha.opts index 1010a16..2cc407e 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -1,2 +1,2 @@ ---compilers coffee:coffee-script ---reporter spec \ No newline at end of file +--compilers mocha --compilers coffee:coffee-script/register +--reporter spec