Browse Source

use G's wording for error message

master
Nathan Rajlich 8 years ago
parent
commit
73f22bb68e
  1. 2
      lib/read-metadata.js
  2. 3
      test/index.js

2
lib/read-metadata.js

@ -142,7 +142,7 @@ async function readMetaData(path, {
// file, then fail hard and let the user know that they need to pick one or the
// other
if (hasNowJson) {
const e = new Error('Refusing to proceed with multiple Now configurations (`now.json` and `package.json`). Please pick only one, then try again!')
const e = new Error('You have a `now` configuration field inside `package.json`, but configuration is also present in `now.json`! Please ensure there\'s a single source of configuration by removing one')
e.userError = true
throw e
} else {

3
test/index.js

@ -196,5 +196,6 @@ test('throws when both `now.json` and `package.json:now` exist', async t => {
e = err
}
t.is(e.name, 'Error')
t.pass(/refusing to proceed/i.test(e.message))
t.is(e.userError, true)
t.pass(/please ensure there\'s a single source of configuration/i.test(e.message))
})

Loading…
Cancel
Save