Selective yes (fix #802) (#808)

* Selective yes flag (fix #802)

* Selective yes flag (fix #802)

* selective yes

* MacOS
This commit is contained in:
Roey Darwish Dror
2021-12-06 14:44:20 +02:00
committed by GitHub
parent 4b8cf641a1
commit ab3ff0ecae
11 changed files with 77 additions and 59 deletions

View File

@@ -1,13 +1,16 @@
use crate::execution_context::ExecutionContext;
use crate::executor::CommandExt;
use crate::terminal::{is_dumb, print_separator};
use crate::utils::{require_option, which, PathExt};
use anyhow::Result;
#[cfg(windows)]
use std::path::Path;
use std::path::PathBuf;
use std::process::Command;
use anyhow::Result;
use crate::execution_context::ExecutionContext;
use crate::executor::CommandExt;
use crate::terminal::{is_dumb, print_separator};
use crate::utils::{require_option, which, PathExt};
use crate::Step;
pub struct Powershell {
path: Option<PathBuf>,
profile: Option<PathBuf>,
@@ -69,7 +72,7 @@ impl Powershell {
cmd.push("-Verbose")
}
if ctx.config().yes() {
if ctx.config().yes(Step::Powershell) {
cmd.push("-Confirm")
}