Skip to content

Commit 52b8a92

Browse files
committed
utils: Don't use run in run_with_cmd_context
`run` hides stderr until the command fails, which is not what we want for all current users of `run_with_cmd_context` - it's currently used by long running processes where we want the users to see all the output live. Signed-off-by: Omer Tuchfeld <[email protected]>
1 parent 4ac494a commit 52b8a92

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

utils/src/command.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ impl CommandRunExt for Command {
139139
}
140140

141141
fn run_with_cmd_context(&mut self) -> Result<()> {
142-
self.run()
142+
self.status()?
143+
.success()
144+
.then_some(())
143145
// The [`Debug`] output of command contains a properly shell-escaped commandline
144146
// representation that the user can copy paste into their shell
145147
.context("Failed to run command: {self:#?}")

0 commit comments

Comments
 (0)