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

[TIMOB-18629] Changed the Node.js check from a hard range limit to a sof... #200

Merged
merged 1 commit into from
Mar 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ logger.banner = function () {
if (bannerEnabled) {
logger.log(info.about.name.cyan.bold + ', CLI version ' + info.version + (logger.activeSdk ? ', Titanium SDK version ' + logger.activeSdk : '') + '\n' + info.about.copyright);
logger.log('\n' + __('Please report bugs to %s', 'http://jira.appcelerator.org/'.cyan) + '\n');
logger.emit('cli:logger-banner');
bannerWasRendered = true;
}
bannerEnabled = false;
Expand Down
8 changes: 7 additions & 1 deletion lib/titanium.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,18 @@ function run(locale) {
if (sdk && !tooOld) {
// check if the sdk is compatible with our version of node
try {
if (!appc.version.satisfies(process.version.replace(/^v/, ''), sdk.packageJson.vendorDependencies.node)) {
var supported = appc.version.satisfies(process.version.replace(/^v/, ''), sdk.packageJson.vendorDependencies.node, true);
if (supported === false) {
logger.banner();
logger.error(__('Titanium SDK %s is incompatible with Node.js %s', sdk.name, process.version) + '\n');
logger.log(__('You will need to install Node.js %s in order to use this version of the Titanium SDK.', 'v' + appc.version.parseMax(sdk.packageJson.vendorDependencies.node)));
logger.log();
process.exit(1);
} else if (supported === 'maybe' && !config.get('cli.hideNodejsWarning')) {
logger.on('cli:logger-banner', function () {
logger.warn(__('Support for Node.js %s has not been verified for Titanium SDK %s', process.version, sdk.name).yellow);
logger.warn(__('If you run into issues, try downgrading to Node.js %s', 'v' + appc.version.parseMax(sdk.packageJson.vendorDependencies.node)).yellow + '\n');
});
}
} catch (e) {}

Expand Down