MCPcopy Create free account
hub / github.com/bootc-dev/bootc / command_run_inherited

Function command_run_inherited

crates/utils/src/command.rs:234–252  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

232
233 #[test]
234 fn command_run_inherited() {
235 // Test successful command
236 Command::new("true").run_inherited().unwrap();
237
238 // Test failed command
239 assert!(Command::new("false").run_inherited().is_err());
240
241 // Test that stderr is not captured (just check error format)
242 let e = Command::new("/bin/sh")
243 .args(["-c", "echo should-not-be-captured 1>&2; exit 1"])
244 .run_inherited()
245 .err()
246 .unwrap();
247 // Should not contain the stderr message since it's inherited
248 assert_eq!(
249 e.to_string(),
250 "Subprocess failed: ExitStatus(unix_wait_status(256))"
251 );
252 }
253
254 #[test]
255 fn command_run_capture_stderr() {

Callers

nothing calls this directly

Calls 2

run_inheritedMethod · 0.80
argsMethod · 0.80

Tested by

no test coverage detected