From 62510f42bf3ca583bd62481672e2556ba729695c Mon Sep 17 00:00:00 2001 From: Spenser Black Date: Fri, 10 Jan 2025 23:23:59 -0500 Subject: [PATCH] Fix shell wrapper for PowerShell (#195) 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'". --- docs/quick-start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/quick-start.md b/docs/quick-start.md index 98d48013..8cd40942 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -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 }