Browse Source

Fix now alias failing when now.json doesn’t define deployment type (#321)

master
Hugo 8 years ago
committed by Leo Lamprecht
parent
commit
7c14fd7cb1
  1. 4
      lib/read-metadata.js

4
lib/read-metadata.js

@ -1,6 +1,6 @@
const {basename, resolve: resolvePath} = require('path')
const chalk = require('chalk')
const {readFile} = require('fs-promise')
const {readFile, exists} = require('fs-promise')
const {parse: parseDockerfile} = require('docker-file-parser')
const listPackage = {
@ -45,6 +45,8 @@ async function readMetaData(path, {
// when both a package.json and Dockerfile exist
if (nowConfig.type) {
deploymentType = nowConfig.type
} else if (nowConfig.type === undefined && !await exists(resolvePath(path, 'package.json'))) {
deploymentType = 'static'
}
if (nowConfig.name) {
deploymentName = nowConfig.name

Loading…
Cancel
Save