From a3b875c8577ac52c804158e03ba8a97de6f1a3f3 Mon Sep 17 00:00:00 2001 From: Eric Black Date: Fri, 27 Feb 2026 12:18:50 -0800 Subject: [PATCH] fix: prevent spinner from interfering with 2FA prompt in heroku run Moved the "Running on " status message to display after the dyno is successfully created, rather than before the API call. This ensures the spinner doesn't interfere with inquirer's readline interface when a 2FA prompt is displayed during the dyno creation POST request. Previously, the spinner would start before the API call, and if 2FA was required, inquirer would try to prompt while the spinner was still active, causing the prompt to be reprinted on every keystroke. --- src/lib/run/dyno.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib/run/dyno.ts b/src/lib/run/dyno.ts index bb9711fc32..756ae3373e 100644 --- a/src/lib/run/dyno.ts +++ b/src/lib/run/dyno.ts @@ -103,10 +103,6 @@ export default class Dyno extends Duplex { // Starts the dyno async start() { this._startedAt = Date.now() - if (this.opts.showStatus) { - ux.action.start(`Running ${color.code(this.opts.command)} on ${color.app(this.opts.app)}`) - } - await this._doStart() } @@ -178,6 +174,12 @@ export default class Dyno extends Duplex { }) // @ts-ignore this.dyno = dyno.body + + // Show status after dyno is created (after any 2FA prompt) + if (this.opts.showStatus) { + ux.action.start(`Running ${color.code(this.opts.command)} on ${color.app(this.opts.app)}`) + } + if (this.opts.attach || this.opts.dyno) { // @ts-ignore if (this.dyno.name && this.opts.dyno === undefined) {