Skip to content

Commit

Permalink
spinner statuses on heroku:deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Jun 18, 2020
1 parent f116f2e commit 22e7c75
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/commands/shane/heroku/repo/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default class HerokuRepoDeploy extends SfdxCommand {
if (this.flags.name) {
body.app.organization = this.flags.team;
}

this.ux.startSpinner('asking heroku to deploy the app');
const result = await request.post({
url: herokuAPIendpoint,
headers,
Expand All @@ -107,6 +107,7 @@ export default class HerokuRepoDeploy extends SfdxCommand {
let statusResult;

while (status === 'pending') {
this.ux.setSpinnerStatus('waiting for the app to deploy');
statusResult = await request.get({
url: `${herokuAPIendpoint}/${result.id}`,
json: true,
Expand All @@ -115,7 +116,7 @@ export default class HerokuRepoDeploy extends SfdxCommand {
status = statusResult.status;
sleep(pollingInterval);
}

this.ux.stopSpinner();
// if error
if (status === 'failed') {
this.ux.log(chalk.red('Error deploying the app'));
Expand Down

0 comments on commit 22e7c75

Please sign in to comment.