fix(pwsh): trim trailing backslash from paths

relates to #2009
This commit is contained in:
Jan De Dobbeleer 2022-03-31 07:18:02 +02:00 committed by Jan De Dobbeleer
parent f466f919e3
commit c7b681a2b5

View file

@ -51,6 +51,8 @@ function global:Set-PoshContext {}
function global:Get-PoshContext { function global:Get-PoshContext {
$cleanPWD = $PWD.ProviderPath $cleanPWD = $PWD.ProviderPath
$cleanPSWD = $PWD.ToString() $cleanPSWD = $PWD.ToString()
$cleanPWD = $cleanPWD.TrimEnd('\')
$cleanPSWD = $cleanPSWD.TrimEnd('\')
return $cleanPWD, $cleanPSWD return $cleanPWD, $cleanPSWD
} }