Skip to content

Commit

Permalink
fix: drop version check as it seems to be not needed
Browse files Browse the repository at this point in the history
The current version check doesn't work with two digit minor/major release numbers breaking at 1.10.x
As I didn't see a good reason to have this check in first place I dropped it.

- closes edvisor-io#17
  • Loading branch information
sakulstra committed Mar 19, 2020
1 parent cb72dca commit 0c38c0d
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/lib/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ export function validateGCloud() {
}

export function validateMeteor() {
let release;

// Ensure Meteor CLI is installed
winston.debug('check Meteor is installed');
if (commandExists.sync('meteor') === false) {
Expand All @@ -28,23 +26,12 @@ export function validateMeteor() {

// Determine current release/packages from '.meteor' directory
try {
release = fs.readFileSync('.meteor/release', 'utf8');
fs.readFileSync('.meteor/release', 'utf8');
} catch (error) {
/* Abort the program if files are not found, this is a strong
indication we may not be in the root project directory */
throw new Error('You must be in a Meteor project directory');
}

// Determine major/minor version numbers by stripping non-numeric characters from release
const versionNumbers = release.replace(/[^0-9]/g, '');
const majorVersion = Number.parseInt(versionNumbers.charAt(0), 10);
const minorVersion = Number.parseInt(versionNumbers.charAt(1), 10);

// Ensure current Meteor release is >= 1.4
winston.debug('check current Meteor release >= 1.4');
if (majorVersion < 1 || minorVersion < 4) {
throw new Error('Meteor version must be >= 1.4');
}
}

export function validateSettings(filePath) {
Expand Down

0 comments on commit 0c38c0d

Please sign in to comment.