From dad0a9b1bb7ccd754dd47e208347052be90b2a6b Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Thu, 19 Nov 2020 13:32:21 +0200 Subject: [PATCH] Check if the powershell profile directory exists This works whether the user uses profile.ps1 or Microsoft.PowerShell_profile.ps1 --- src/steps/powershell.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/steps/powershell.rs b/src/steps/powershell.rs index f1090a86..a936bc79 100644 --- a/src/steps/powershell.rs +++ b/src/steps/powershell.rs @@ -21,7 +21,7 @@ impl Powershell { let profile = path.as_ref().and_then(|path| { Command::new(path) - .args(&["-Command", "echo $profile"]) + .args(&["-Command", "Split-Path $profile"]) .check_output() .map(|output| PathBuf::from(output.trim())) .and_then(|p| p.require())