From 0c5879a9c9e125facd0265742ae35a7f753aec21 Mon Sep 17 00:00:00 2001 From: Lucas Trzesniewski Date: Thu, 26 Mar 2026 21:34:20 +0100 Subject: fix(powershell): handle non-FileSystem drives (#3353) The current version generates the following error when PowerShell's current directory is on a [non-FileSystem drive](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_providers): > A parameter cannot be found that matches parameter name 'Raw'. Repro: image ## Checks - [x] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle - [x] I have checked that there are no existing pull requests for the same thing --- crates/atuin/src/shell/atuin.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates') diff --git a/crates/atuin/src/shell/atuin.ps1 b/crates/atuin/src/shell/atuin.ps1 index 7f6ad8cf..088e8626 100644 --- a/crates/atuin/src/shell/atuin.ps1 +++ b/crates/atuin/src/shell/atuin.ps1 @@ -144,7 +144,7 @@ New-Module -Name Atuin -ScriptBlock { # Start-Process does some crazy stuff, just use the Process class directly to have more control. $process = New-Object System.Diagnostics.Process $process.StartInfo.FileName = "atuin" - $process.StartInfo.Arguments = "search -i --result-file ""$resultFile"" $ExtraArgs" + $process.StartInfo.Arguments = "search -i --result-file ""$($resultFile.FullName)"" $ExtraArgs" $process.StartInfo.UseShellExecute = $false $process.StartInfo.RedirectStandardError = $true $process.StartInfo.StandardErrorEncoding = [System.Text.Encoding]::UTF8 @@ -159,7 +159,7 @@ New-Module -Name Atuin -ScriptBlock { $errorOutput = $process.StandardError.ReadToEnd().Trim() $process.WaitForExit() - $suggestion = (Get-Content -Raw $resultFile -Encoding UTF8 | Out-String).Trim() + $suggestion = (Get-Content -LiteralPath $resultFile.FullName -Raw -Encoding UTF8 | Out-String).Trim() } catch { $errorOutput = $_ @@ -203,7 +203,7 @@ New-Module -Name Atuin -ScriptBlock { } finally { [System.Console]::OutputEncoding = $previousOutputEncoding - Remove-Item $resultFile + $resultFile.Delete() } } -- cgit v1.3.1