From f31d1f0804f5583a5cc3b4597adbb1e200447860 Mon Sep 17 00:00:00 2001 From: Olli Vanhoja Date: Sat, 29 Oct 2016 00:32:36 +0300 Subject: [PATCH] Fixes to Dockerfile metadata parsing (#103) - No need to check if pkg.name is null - Properly default to basename if labels.name isn't set --- lib/read-metadata.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/read-metadata.js b/lib/read-metadata.js index 856b9cc..e42fc2b 100644 --- a/lib/read-metadata.js +++ b/lib/read-metadata.js @@ -44,7 +44,7 @@ export default async function (path, { throw e } - if (pkg.name === null || typeof pkg.name !== 'string') { + if (typeof pkg.name !== 'string') { name = basename(path) if (!quiet && !isStatic) { @@ -106,7 +106,7 @@ export default async function (path, { } }) - if (labels.name === null) { + if (!labels.name) { name = basename(path) if (!quiet) {