This commit is contained in:
Roey Darwish Dror
2021-04-07 10:23:26 +03:00
parent a6d7c6dca9
commit 141ec83372

View File

@@ -3,7 +3,7 @@ use crate::executor::CommandExt;
use crate::terminal::{is_dumb, print_separator}; use crate::terminal::{is_dumb, print_separator};
use crate::utils::{require_option, which, PathExt}; use crate::utils::{require_option, which, PathExt};
use anyhow::Result; use anyhow::Result;
use std::path::PathBuf; use std::path::{Path, PathBuf};
use std::process::Command; use std::process::Command;
pub struct Powershell { pub struct Powershell {
@@ -45,7 +45,7 @@ impl Powershell {
} }
#[cfg(windows)] #[cfg(windows)]
pub fn has_module(powershell: &PathBuf, command: &str) -> bool { pub fn has_module(powershell: &Path, command: &str) -> bool {
Command::new(&powershell) Command::new(&powershell)
.args(&[ .args(&[
"-NoProfile", "-NoProfile",