Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Check if the powershell profile directory exists
Browse files Browse the repository at this point in the history
This works whether the user uses profile.ps1 or Microsoft.PowerShell_profile.ps1
  • Loading branch information
r-darwish committed Nov 19, 2020
1 parent 9a368d8 commit dad0a9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/steps/powershell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit dad0a9b

Please sign in to comment.