Skip to content
This repository has been archived by the owner on May 15, 2019. It is now read-only.

Commit

Permalink
Update Node version warning message for emulator (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
gligoran authored and grant committed Apr 16, 2019
1 parent 3cae45b commit 098e253
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/emulator
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ if (!semver.satisfies(process.version, '>= 6.11.5')) {
process.exit(1);
}

if (semver.satisfies(process.version, '>= 7.0.0')) {
console.log(`Warning: You're using Node.js ${process.version} but Google Cloud Functions emulator only supports v6.x.`);
if (semver.satisfies(process.version, '7.x.x') || semver.satisfies(process.version, '>= 9.0.0')) {
console.log(`Warning: You're using Node.js ${process.version} but the Google Cloud Functions runtime is only available in Node.js 6 and Node.js 8.` +
` Therefore, results from running emulated functions may not match production behavior.`);
}

exports.emulator = require('../src/emulator');
Expand Down

0 comments on commit 098e253

Please sign in to comment.