diff --git a/lib/controllers/project.js b/lib/controllers/project.js index 98be383..50d9887 100755 --- a/lib/controllers/project.js +++ b/lib/controllers/project.js @@ -156,6 +156,13 @@ Project.prototype.deploy = function(projectId, file, callback) { client.upload(projectId, file); client.on('progress', function(progress) { + + // The progress bar UI starts at 1. This keeps it from jumping + // to zero, then back to 1. + if(progress < 0.01) { + progress = 0.01; + } + if (process.stdout.isTTY) { ubar.tick((progress * 100) - ubar.curr); } }); diff --git a/lib/controllers/uploader.js b/lib/controllers/uploader.js index 92a256b..df4b078 100644 --- a/lib/controllers/uploader.js +++ b/lib/controllers/uploader.js @@ -101,12 +101,12 @@ Uploader.prototype.monitorProgress = function(projectId) { // Wait a second and get status again. if(self.uploading) { - setTimeout(function() { getStatus(); }, 1000); + setTimeout(getStatus, 1000); } }); }; - setTimeout(function() { getStatus(); }, 1000); + setTimeout(getStatus, 1000); }; module.exports = Uploader; \ No newline at end of file