Skip to content

Commit

Permalink
fixing -e to actually throw an error code, fixes #32
Browse files Browse the repository at this point in the history
  • Loading branch information
moschel committed Nov 9, 2012
1 parent 8db4d0e commit 1bb7eb1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions open/utils.js
Expand Up @@ -74,14 +74,12 @@ steal(function(){
}

page = _args.shift();

var opts = steal.opts(_args, {
// true to run with coverage on
coverage: 0,
// the browser you want to open ("*iexplore")
browser: 1,
// turn on if you want to exit hard with the -e flag
failOnError: 0,
failOnError: parseInt(java.lang.System.getenv("ERRORLEV"), 10),
// provide a filename to record test output in an xml format that jenkins can read
out: 1,
// use to provide your own selenium host server
Expand All @@ -94,7 +92,11 @@ steal(function(){

// output.js uses this to create the file
FuncUnit.outputFile = opts.out;
print("Opening "+opts.page);;

// turn on with the -e flag if you want to exit hard
FuncUnit.failOnError = parseInt(java.lang.System.getenv("ERRORLEV"), 10);

print("Opening "+opts.page);
return opts;
}
})

1 comment on commit 1bb7eb1

@moschel
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually meant to say fixes #31

Please sign in to comment.