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

Update Node.js version warning message #261

Merged
merged 2 commits into from
Aug 1, 2018
Merged
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
5 changes: 3 additions & 2 deletions bin/functions
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,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 only supports v6.11.5.`);
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.`);
}

/**
Expand Down