Make Node warning a multi-line string

This commit is contained in:
Tim Perry 2017-06-26 13:24:54 +02:00
parent 410390a9ae
commit 6182e7c98a
2 changed files with 5 additions and 3 deletions

View File

@ -39,7 +39,7 @@ Raven.setContext({
validNodeVersions = require('../package.json').engines.node;
if (!require('semver').satisfies(process.version, validNodeVersions)) {
console.warn("Warning: this version of Node does not match the requirements of this package. This package expects " + validNodeVersions + ", but you're using " + process.version + ". This may cause unexpected behaviour.");
console.warn("Warning: this version of Node does not match the requirements of this package.\nThis package expects " + validNodeVersions + ", but you're using " + process.version + ".\nThis may cause unexpected behaviour.");
}
globalTunnel = require('global-tunnel-ng');

View File

@ -29,9 +29,11 @@ Raven.setContext
validNodeVersions = require('../package.json').engines.node
if not require('semver').satisfies(process.version, validNodeVersions)
console.warn("Warning: this version of Node does not match the requirements of this package.
console.warn """
Warning: this version of Node does not match the requirements of this package.
This package expects #{validNodeVersions}, but you're using #{process.version}.
This may cause unexpected behaviour.")
This may cause unexpected behaviour.
"""
# Doing this before requiring any other modules,