Browse Source

Allow `type` fields in metafiles to hide type prompt

This closes #603
master
Leo Lamprecht 8 years ago
parent
commit
a1aae0da52
  1. 12
      lib/read-metadata.js

12
lib/read-metadata.js

@ -40,11 +40,21 @@ async function readMetaData(
}
}
// We can remove this once the prompt for choosing `--npm` or `--docker` is gone
if (pkg && pkg.now && pkg.now.type) {
type = nowConfig.type
}
// The same goes for this
if (nowConfig && nowConfig.type) {
type = nowConfig.type
}
if (!type) {
type = await determineType(path)
// Both `package.json` and `Dockerfile` exist! Prompt the user to pick one.
// We can remove this soon (details are internal)
// We can remove this soon (details are internal) - also read the comment paragraph above
if (type === 'docker' && (pkg && dockerfile)) {
const err = new Error(
'Ambiguous deployment (`package.json` and `Dockerfile` found). ' +

Loading…
Cancel
Save