Switch to --shell=none/-N, do not change the default

This commit is contained in:
David Peter authored and David Peter committed 2022-02-22 22:51:09 +01:00
1 parent d9418e0731
commit 365ff2584d
5 files changed
+37 -24

No files matched your search

+11 -7
View File
@@ -282,13 +282,17 @@ impl Options {
OutputStyleOption::Disabled => {}
};
options.executor_kind = match (matches.is_present("debug-mode"), matches.value_of("shell"))
{
(false, Some(shell)) if shell == "default" => ExecutorKind::Shell(Shell::default()),
(false, Some(shell)) => ExecutorKind::Shell(Shell::parse_from_str(shell)?),
(false, None) => ExecutorKind::Raw,
(true, Some(shell)) => ExecutorKind::Mock(Some(shell.into())),
(true, None) => ExecutorKind::Mock(None),
options.executor_kind = if matches.is_present("no-shell") {
ExecutorKind::Raw
} else {
match (matches.is_present("debug-mode"), matches.value_of("shell")) {
(false, Some(shell)) if shell == "default" => ExecutorKind::Shell(Shell::default()),
(false, Some(shell)) if shell == "none" => ExecutorKind::Raw,
(false, Some(shell)) => ExecutorKind::Shell(Shell::parse_from_str(shell)?),
(false, None) => ExecutorKind::Shell(Shell::default()),
(true, Some(shell)) => ExecutorKind::Mock(Some(shell.into())),
(true, None) => ExecutorKind::Mock(None),
}
};
if matches.is_present("ignore-failure") {