From c0015689b4bd725408c3da445007a6fce2ca4261 Mon Sep 17 00:00:00 2001 From: isc-dchui Date: Mon, 6 Jul 2026 11:48:26 -0400 Subject: [PATCH] Fix issue where IPM would get stuck in secret mode --- CHANGELOG.md | 1 + src/cls/IPM/Repo/Definition.cls | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc0056dc..d3398d63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ no overlap. modules are. - #1187: Remove extra path entries in output of %IPM.Storage.ResourceReference:ResolveChildren() that broke unguarded downstream callers. - #1191: Fixed issue where configured Python version would not be used automatically during calls to pip +- #1198: Fixed bug where using `-password-stdin` would leave the IPM terminal in secret mode ## [0.10.7] - 2026-05-29 diff --git a/src/cls/IPM/Repo/Definition.cls b/src/cls/IPM/Repo/Definition.cls index 940afde3..e55c5a83 100644 --- a/src/cls/IPM/Repo/Definition.cls +++ b/src/cls/IPM/Repo/Definition.cls @@ -186,10 +186,19 @@ ClassMethod Configure( if $data(pModifiers("password-stdin")) { // prompt for password using secret input terminal mode - open $io:(:"S") - read "Password: ", pwd - close $io - set pModifiers("password") = pwd + set ioDevice = $io + set readSC = $$$OK + try { + open ioDevice:(:"S") + read "Password: ", pwd + write ! + set pModifiers("password") = pwd + } catch ex { + set readSC = ex.AsStatus() + } + // Restore normal echo mode — must happen even on Ctrl+C or error + open ioDevice:(:"") + $$$ThrowOnError(readSC) } elseif $data(pModifiers("password")) { write !, $$$FormattedLine($$$Yellow, "WARNING: Using --password via the CLI is insecure. Use --password-stdin.") }