From 3e7634159ed444f2813f926b785fff24f66dc948 Mon Sep 17 00:00:00 2001 From: Leo Lamprecht Date: Sat, 26 Nov 2016 17:24:59 +0100 Subject: [PATCH] Only show message if GH search takes long --- bin/now-deploy.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/bin/now-deploy.js b/bin/now-deploy.js index 86ca03b..6c6cd65 100755 --- a/bin/now-deploy.js +++ b/bin/now-deploy.js @@ -209,25 +209,15 @@ async function sync(token) { let repo if (isRepoPath(rawPath)) { - process.stdout.write('> Didn\'t find directory. Searching on GitHub') - - let dotCount = 0 - - const dots = setInterval(() => { - dotCount++ - process.stdout.write('.') - - if (dotCount === 20) { - clearInterval(dots) - } + const searchMessage = setTimeout(() => { + console.log('> Didn\'t find directory. Searching on GitHub...') }, 500) try { repo = await onGitHub(rawPath, debug) } catch (err) {} - clearInterval(dots) - process.stdout.write('\n') + clearTimeout(searchMessage) } if (repo) {