test(cli): the script helper's two spellings share one type
932c0517 pushed a helper whose branches were arrays of different
lengths; the three test binaries did not compile. A slice now.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
This commit is contained in:
1 parent
932c05177f
commit
a8ce2e7d6c
3 files changed
+15
-21
No files matched your search
@@ -163,14 +163,12 @@ fn another_home_ignores_this_accounts_data_home() {
|
||||
/// with the command's exit code as its own: util-linux's spelling on
|
||||
/// Linux, BSD's on macOS (no `-f`, no `-c`; the command after the file).
|
||||
fn script_args(command: &str) -> Vec<String> {
|
||||
if cfg!(target_os = "macos") {
|
||||
["-qeF", "/dev/null", "/bin/sh", "-c", command]
|
||||
let args: &[&str] = if cfg!(target_os = "macos") {
|
||||
&["-qeF", "/dev/null", "/bin/sh", "-c", command]
|
||||
} else {
|
||||
["-qefc", command, "/dev/null"]
|
||||
}
|
||||
.into_iter()
|
||||
.map(String::from)
|
||||
.collect()
|
||||
&["-qefc", command, "/dev/null"]
|
||||
};
|
||||
args.iter().map(|a| a.to_string()).collect()
|
||||
}
|
||||
|
||||
/// Run `args` at a terminal (a pseudo-terminal, through `script`),
|
||||
|
||||
Reference in new issue
Block a user