Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
fix(cli): Make unknown flag check a warning instead of an error.
Browse files Browse the repository at this point in the history
  • Loading branch information
heathkit committed Jan 27, 2017
1 parent 588901c commit 5d74c31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
9 changes: 5 additions & 4 deletions lib/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,11 @@ export class Runner extends EventEmitter {
unknownFlags = unknownFlags.filter((f) => extraFlags.indexOf(f) === -1);
}
if (unknownFlags.length > 0 && !this.config_.disableChecks) {
throw new ConfigError(
logger,
'Found extra flags: ' + unknownFlags.join(', ') +
', please use --disableChecks flag to disable the Protractor CLI flag checks. ');
// TODO: Make this throw a ConfigError in Protractor 6.
logger.warn(
'Ignoring unknown extra flags: ' + unknownFlags.join(', ') + '. This will be' +
' an error in future versions, please use --disableChecks flag to disable the ' +
' Protractor CLI flag checks. ');
}
return this.plugins_.onPrepare().then(() => {
return helper.runFilenameOrFn_(this.config_.configDir, this.preparer_);
Expand Down
6 changes: 0 additions & 6 deletions scripts/errorTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ var checkLogs = function(output, messages) {
*Below are exit failure tests*
******************************/

runProtractor = spawn('node',
['bin/protractor', 'example/conf.js', '--foobar', 'foobar']);
output = runProtractor.stdout.toString();
messages = ['Error: Found extra flags: foobar'];
checkLogs(output, messages);

// assert authentication error for sauce labs
runProtractor = spawn('node',
['bin/protractor', 'spec/errorTest/sauceLabsAuthentication.js']);
Expand Down

0 comments on commit 5d74c31

Please sign in to comment.