Browse Source

Fix code style 💅 (#107)

master
Matheus Fernandes 8 years ago
committed by Guillermo Rauch
parent
commit
53f1ffab40
  1. 12
      lib/read-metadata.js

12
lib/read-metadata.js

@ -44,14 +44,14 @@ export default async function (path, {
throw e throw e
} }
if (typeof pkg.name !== 'string') { if (typeof pkg.name === 'string') {
name = pkg.name
} else {
name = basename(path) name = basename(path)
if (!quiet && !isStatic) { if (!quiet && !isStatic) {
console.log(`> No \`name\` in \`package.json\`, using ${chalk.bold(name)}`) console.log(`> No \`name\` in \`package.json\`, using ${chalk.bold(name)}`)
} }
} else {
name = pkg.name
} }
description = pkg.description description = pkg.description
@ -106,14 +106,14 @@ export default async function (path, {
} }
}) })
if (!labels.name) { if (labels.name) {
name = labels.name
} else {
name = basename(path) name = basename(path)
if (!quiet) { if (!quiet) {
console.log(`> No \`name\` LABEL in \`Dockerfile\`, using ${chalk.bold(name)}`) console.log(`> No \`name\` LABEL in \`Dockerfile\`, using ${chalk.bold(name)}`)
} }
} else {
name = labels.name
} }
description = labels.description description = labels.description

Loading…
Cancel
Save