Skip to content

Commit c001568

Browse files
committed
Fix issue where IPM would get stuck in secret mode
1 parent e8f8292 commit c001568

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ no overlap.
1515
modules are.
1616
- #1187: Remove extra path entries in output of %IPM.Storage.ResourceReference:ResolveChildren() that broke unguarded downstream callers.
1717
- #1191: Fixed issue where configured Python version would not be used automatically during calls to pip
18+
- #1198: Fixed bug where using `-password-stdin` would leave the IPM terminal in secret mode
1819

1920
## [0.10.7] - 2026-05-29
2021

src/cls/IPM/Repo/Definition.cls

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,19 @@ ClassMethod Configure(
186186

187187
if $data(pModifiers("password-stdin")) {
188188
// prompt for password using secret input terminal mode
189-
open $io:(:"S")
190-
read "Password: ", pwd
191-
close $io
192-
set pModifiers("password") = pwd
189+
set ioDevice = $io
190+
set readSC = $$$OK
191+
try {
192+
open ioDevice:(:"S")
193+
read "Password: ", pwd
194+
write !
195+
set pModifiers("password") = pwd
196+
} catch ex {
197+
set readSC = ex.AsStatus()
198+
}
199+
// Restore normal echo mode — must happen even on Ctrl+C or error
200+
open ioDevice:(:"")
201+
$$$ThrowOnError(readSC)
193202
} elseif $data(pModifiers("password")) {
194203
write !, $$$FormattedLine($$$Yellow, "WARNING: Using --password via the CLI is insecure. Use --password-stdin.")
195204
}

0 commit comments

Comments
 (0)