Skip to content

Commit ba8c5bc

Browse files
committed
preloading credentials in Command.init so commands that check this.heroku.auth work with async credential-manager
1 parent 5e6985e commit ba8c5bc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/command.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ export abstract class Command extends Base {
6161
async init(): Promise<void> {
6262
await super.init()
6363

64+
// Preload credentials so this.heroku.auth is set before run() (async credential-manager + sync checks).
65+
await this.heroku.getAuth()
66+
6467
if (!this.isPromptModeActive()) {
6568
return
6669
}

0 commit comments

Comments
 (0)