Skip to content

fix: prevent spinner from interfering with 2FA prompt in heroku run and heroku console#3545

Merged
eablack merged 1 commit intov11.0.0from
eb/fix-issue-with-2fa-and-heroku-run
Feb 27, 2026
Merged

fix: prevent spinner from interfering with 2FA prompt in heroku run and heroku console#3545
eablack merged 1 commit intov11.0.0from
eb/fix-issue-with-2fa-and-heroku-run

Conversation

@eablack
Copy link
Contributor

@eablack eablack commented Feb 27, 2026

Summary

Fixes an issue where the 2FA prompt repeats itself on every keystroke when running heroku run commands that require two-factor authentication.

The root cause was that the "Running on " spinner was started before the dyno creation API call. When the API returned a 403 requiring 2FA, inquirer would attempt to prompt for the code while the oclif action spinner was still running. The spinner's cursor manipulation interfered with inquirer's readline interface, causing the prompt text to be reprinted with each keystroke.

This fix moves the status message to display after the dyno is successfully created, ensuring any 2FA prompts appear without active spinner interference.

Type of Change

Patch Updates (patch semver update)

  • fix: Bug fix

Testing

Notes:
This issue only occurs with the heroku run command when 2FA is required.

Steps:

  1. Enable 2FA on a Heroku account
  2. Run heroku run bash on an app requiring 2FA
  3. Verify the "? Two-factor code" prompt displays cleanly without repeating on each keystroke
  4. Verify the "Running bash on " status appears after successful authentication

Related Issues

https://gus.lightning.force.com/lightning/r/ADM_Work__c/a07EE00002VUyU7YAL/view

Moved the "Running <command> on <app>" 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.
@eablack eablack requested a review from a team as a code owner February 27, 2026 20:19
@eablack eablack changed the title fix: prevent spinner from interfering with 2FA prompt in heroku run fix: prevent spinner from interfering with 2FA prompt in heroku run and heroku console Feb 27, 2026
@eablack eablack merged commit c6ab2eb into v11.0.0 Feb 27, 2026
13 checks passed
@eablack eablack deleted the eb/fix-issue-with-2fa-and-heroku-run branch February 27, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants