Browse Source

fail hard when both a `now.json` and `package.json` file with "now" are present

As discussed in the GH issue.
master
Nathan Rajlich 8 years ago
parent
commit
f6c0e65b7f
  1. 6
      lib/read-metadata.js

6
lib/read-metadata.js

@ -125,9 +125,11 @@ module.exports = async function getMetadata(path, {
name = deploymentName
}
// merge in `package.now` if present, but have `now.json` take precedence
// if the project has both a `now.json` and `now` Object in the `package.json`
// file, then fail hard and let the user know that they need to pick one or the
// other
if (pkg.now) {
nowConfig = extend({}, pkg.now, nowConfig)
throw new Error('Refusing to proceed with multiple Now configurations (`now.json` and `package.json`). Please pick only one, then try again!')
}
return {

Loading…
Cancel
Save