Skip to content

Commit 48c2557

Browse files
committed
fix(dist): fix npm publish 2fac in release script
When the relase script runs 'npm publish', publishing fails because the command requires interactive 2-factor auth. Make release.go forward stdin and stdout/stderr so that 'npm publish' can run interactively. This commit affects more commands, such as 'rsync', in case an ssh auth prompt appears, or if the user just wants to see the output of commands.
1 parent 2b4ea2d commit 48c2557

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dist/release.go

+3
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,9 @@ func UpdateReleaseVersions(options UpdateReleaseVersionsOptions) ([]byte, error)
581581

582582
func RunCommandOrStop(name string, arg ...string) {
583583
cmd := exec.Command(name, arg...)
584+
cmd.Stdin = os.Stdin
585+
cmd.Stdout = os.Stdout
586+
cmd.Stderr = os.Stderr
584587
if err := cmd.Run(); err != nil {
585588
commandString := CommandToShell(cmd.Args)
586589
Stopf("failed to run command:\n$ %s\n%v", commandString, err)

0 commit comments

Comments
 (0)