Skip to content

Commit

Permalink
Merge ec82999 into 0fe4dae
Browse files Browse the repository at this point in the history
  • Loading branch information
frostney committed Dec 4, 2015
2 parents 0fe4dae + ec82999 commit 6a0a9c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions lib/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,10 @@ function run(config, done) {
var wantedAndAlreadyInstalled = config.wanted && (info.updateTo === info.current);
var isDependencyMissing = !info.current;
var isUnstable = false;
var unstableStrings = ["alpha", "beta", "rc"];
var counter;

for (counter = 0; counter < unstableStrings.length; counter++) {
if (info.updateTo && info.updateTo.indexOf(unstableStrings[counter]) !== -1) {
isUnstable = true;
}
// Check for hyphen in version string as this is a prerelease version according to SemVer
if (info.updateTo && info.updateTo.indexOf("-") !== -1) {
isUnstable = true;
}

return !(isGitDependeny || wantedAndAlreadyInstalled || isDependencyMissing || isUnstable);
Expand Down
2 changes: 1 addition & 1 deletion test/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ describe("run()", function () {
});

describe("testing", function () {
describe("if outdated moudles were found", function () {
describe("if outdated modules were found", function () {
before(setupOutdatedModules(outdatedModules));
afterEach(tearDown);

Expand Down

0 comments on commit 6a0a9c7

Please sign in to comment.