Commit c09c3f83 authored by David Dollar's avatar David Dollar

add a warning of no version of node.js specified in package.json

parent 85170d5f
......@@ -116,6 +116,15 @@ engine_versions["npm"]=$(manifest_versions "npm")
engine_requests["npm"]=$(package_engine_version "npm")
echo "-----> Resolving engine versions"
# add a warning if no version of node specified
if [ "${engine_requests["node"]}" == "" ]; then
echo
echo "WARNING: No version of Node.js specified in package.json, see:" | indent
echo "https://devcenter.heroku.com/articles/nodejs-versions" | indent
echo
fi
NODE_VERSION=$(package_resolve_version "node")
echo "Using Node.js version: ${NODE_VERSION}" | indent
......
......@@ -21,6 +21,7 @@ testDetectWithoutPackageJson() {
testPackageJsonWithVersion() {
compile "package-json-version"
assertNotCaptured "WARNING: No version of Node.js specified"
assertCaptured "Using Node.js version: 0.6.11"
assertCaptured "Using npm version: 1.1.9"
assertCapturedSuccess
......@@ -28,6 +29,7 @@ testPackageJsonWithVersion() {
testPackageJsonWithoutVersion() {
compile "package-json-noversion"
assertCaptured "WARNING: No version of Node.js specified"
assertCaptured "Using Node.js version: 0.4.7"
assertCaptured "Using npm version: 1.0.106"
assertCapturedSuccess
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment