Skip to content

Commit 5d959a9

Browse files
committed
refactor(test): remove obsolete set -x injection logic
1 parent 296082a commit 5d959a9

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

crates/rattler_build_core/src/package_test/run_test.rs

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -968,26 +968,8 @@ async fn run_commands_test(
968968

969969
tracing::info!("Testing commands:");
970970

971-
// Clone the script and prepend `set -x` to enable bash tracing for test scripts.
972-
// Only inject for bash/sh scripts (interpreter unset defaults to bash on unix).
973-
let mut test_script = commands_test.script.clone();
974-
let is_bash = cfg!(unix)
975-
&& matches!(
976-
test_script.interpreter.as_deref(),
977-
None | Some("bash") | Some("sh")
978-
);
979-
if is_bash {
980-
test_script.content = match test_script.content {
981-
ScriptContent::Command(cmd) => ScriptContent::Command(format!("set -x\n{}", cmd)),
982-
ScriptContent::Commands(mut cmds) => {
983-
cmds.insert(0, "set -x".to_string());
984-
ScriptContent::Commands(cmds)
985-
}
986-
other => other,
987-
};
988-
}
989-
990-
test_script
971+
commands_test
972+
.script
991973
.run_script(
992974
env_vars,
993975
&test_dir,

0 commit comments

Comments
 (0)