Skip to content

[FIX] tools: let npm ask for a one-time password in the release script - #2074

Merged
ged-odoo merged 1 commit into
masterfrom
master-release-npm-otp-ged
Nov 24, 2026
Merged

ged-odoo merged 1 commit into
masterfrom
master-release-npm-otp-ged

Conversation

@ged-odoo

Copy link
Copy Markdown
Contributor

Before this PR, the release script fails at its last step with EOTP when the npm account uses two-factor authentication: npm publish runs without a terminal (exec), so npm cannot ask for the one-time password (in the browser, or typed in). This is what happened for 3.0.0-beta.1, which had to be published by hand.

This PR runs npm publish attached to the terminal (spawn with stdio: "inherit"), after closing the script's prompt so that it does not read the input meant for npm. No question is asked after that point.

Notes:

  • Not tested with a real publish. Checked in a pty (script): a command started like npm publish was sees no terminal and gets no input, while one started like it is now sees a terminal and receives the typed input. Without closing the prompt first, the terminal stays in raw mode (no echo) and the script competes with npm for the input.
  • Dry run of the script with git, npm, gh and fs stubbed: it still runs to the end, with npm publish started attached to the terminal.
  • The npm publish output is no longer indented like the other steps, since it goes straight to the terminal.

Before this commit, the release script fails at its last step with
EOTP when the npm account uses two-factor authentication: npm publish
runs without a terminal, so npm cannot ask for the one-time password
(in the browser, or typed in).

This commit runs npm publish attached to the terminal, after closing the
script's prompt so that it does not read the input meant for npm.
@ged-odoo
ged-odoo merged commit 02d0f14 into master Nov 24, 2026
2 checks passed
@ged-odoo
ged-odoo deleted the master-release-npm-otp-ged branch November 24, 2026 10:18
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.

1 participant