From 801c9f54e2181ceb6d7c5621ae65d625180b2adb Mon Sep 17 00:00:00 2001 From: stijn Date: Tue, 23 Jul 2024 13:33:29 +0200 Subject: [PATCH] Support the BROOT environment variable for Powershell --- src/shell_install/powershell.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/shell_install/powershell.rs b/src/shell_install/powershell.rs index b3e70f88..5d5cbd85 100644 --- a/src/shell_install/powershell.rs +++ b/src/shell_install/powershell.rs @@ -24,8 +24,12 @@ const PS_FUNC: &str = r#" Function br { $args = $args -join ' ' $cmd_file = New-TemporaryFile + $broot = $env:BROOT + If (-not $broot) { + $broot = 'broot.exe' + } - $process = Start-Process -FilePath 'broot.exe' ` + $process = Start-Process -FilePath $broot ` -ArgumentList "--outcmd $($cmd_file.FullName) $args" ` -NoNewWindow -PassThru -WorkingDirectory $PWD