Skip to content

Commit

Permalink
Fix shell wrapper for PowerShell (#195)
Browse files Browse the repository at this point in the history
This makes sure that `GetFullPath` gets evaluated before passing its
value to `Set-Location`. This prevents `Set-Location` from raising an
error "A positional parameter cannot be found that accepts argument
'C:\path\to\dir'".
  • Loading branch information
spenserblack authored Jan 11, 2025
1 parent e570069 commit 62510f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function y {
yazi $args --cwd-file="$tmp"
$cwd = Get-Content -Path $tmp -Encoding UTF8
if (-not [String]::IsNullOrEmpty($cwd) -and $cwd -ne $PWD.Path) {
Set-Location -LiteralPath [System.IO.Path]::GetFullPath($cwd)
Set-Location -LiteralPath ([System.IO.Path]::GetFullPath($cwd))
}
Remove-Item -Path $tmp
}
Expand Down

0 comments on commit 62510f4

Please sign in to comment.