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