From 554170e3b4206e2091efa86d2600aff421002416 Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Tue, 2 May 2017 11:29:28 -0700 Subject: [PATCH] check for Dockerfile when now.json is present (#486) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Consider a tree like: ``` . ├── Dockerfile └── now.json 0 directories, 2 files ``` Before this patch, this deployment would be considered a "static" deployment, which is incorrect. Now it is properly detected as a "docker" deployment type. --- 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 a326640..a2ac4e6 100644 --- a/lib/read-metadata.js +++ b/lib/read-metadata.js @@ -55,8 +55,8 @@ async function readMetaData( if (nowConfig.type) { deploymentType = nowConfig.type } else if ( - nowConfig.type === undefined && - !await exists(resolvePath(path, 'package.json')) + !await exists(resolvePath(path, 'package.json')) && + !await exists(resolvePath(path, 'Dockerfile')) ) { deploymentType = 'static' }