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

Commit

Permalink
CLI: do not keep adding preset from CLI
Browse files Browse the repository at this point in the history
Fixes #2087
  • Loading branch information
markelog committed Jan 24, 2016
1 parent 787e80e commit 72f9cb5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/config/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,9 @@ Configuration.prototype._loadPreset = function(preset) {
return;
}

// Do not keep adding preset from CLI (#2087)
delete this._overrides.preset;

this._loadedPresets.push(preset);

// If preset is loaded from another preset - preserve the original name
Expand Down
12 changes: 12 additions & 0 deletions test/specs/config/node-configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,18 @@ describe('modules/config/node-configuration', function() {

expect(configuration.getFileExtensions()).to.deep.equal(['.js']);
});

it('should not make a conflict between overrides and preset (#2087)', function() {
configuration.registerPreset('jquery', {});

configuration.overrideFromCLI({
preset: 'jquery'
});

configuration.load({});

expect(configuration.getFileExtensions()).to.deep.equal(['.js']);
});
});

describe('load', function() {
Expand Down

0 comments on commit 72f9cb5

Please sign in to comment.