Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: drop version check as it seems to be not needed #19

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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