Skip to content

Commit 247fb8a

Browse files
committed
fix: set WorkingDirectory in PowerShell Invoke-AtuinSearch
PowerShell's Set-Location (cd) doesn't update the process-level working directory. When Invoke-AtuinSearch spawns atuin search via System.Diagnostics.Process, the child process inherits a stale cwd, causing directory filter mode to match against the wrong directory. Fixes #3350
1 parent 2e3ad07 commit 247fb8a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/atuin/src/shell/atuin.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ New-Module -Name Atuin -ScriptBlock {
150150
$process.StartInfo.StandardErrorEncoding = [System.Text.Encoding]::UTF8
151151
$process.StartInfo.EnvironmentVariables["ATUIN_SHELL"] = "powershell"
152152
$process.StartInfo.EnvironmentVariables["ATUIN_QUERY"] = Get-CommandLine
153+
# PowerShell's Set-Location (cd) doesn't update the process-level working directory, set it explicitly
154+
$process.StartInfo.WorkingDirectory = $PWD.ProviderPath
153155

154156
try {
155157
$process.Start() | Out-Null

0 commit comments

Comments
 (0)