Browse Source

Only show message if GH search takes long

master
Leo Lamprecht 8 years ago
parent
commit
3e7634159e
No known key found for this signature in database GPG Key ID: B08517883D5E0E10
  1. 16
      bin/now-deploy.js

16
bin/now-deploy.js

@ -209,25 +209,15 @@ async function sync(token) {
let repo let repo
if (isRepoPath(rawPath)) { if (isRepoPath(rawPath)) {
process.stdout.write('> Didn\'t find directory. Searching on GitHub') const searchMessage = setTimeout(() => {
console.log('> Didn\'t find directory. Searching on GitHub...')
let dotCount = 0
const dots = setInterval(() => {
dotCount++
process.stdout.write('.')
if (dotCount === 20) {
clearInterval(dots)
}
}, 500) }, 500)
try { try {
repo = await onGitHub(rawPath, debug) repo = await onGitHub(rawPath, debug)
} catch (err) {} } catch (err) {}
clearInterval(dots) clearTimeout(searchMessage)
process.stdout.write('\n')
} }
if (repo) { if (repo) {

Loading…
Cancel
Save