From 16903271a5e9d1f9126affa6967c60e7f34269fc Mon Sep 17 00:00:00 2001 From: qwjyh Date: Tue, 4 Feb 2025 02:43:04 +0900 Subject: [PATCH] update(pwsh): update Enable-SshAgent for new "sudo" introduced in 24H2 --- dotfiles/pwsh/powershell_profile.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles/pwsh/powershell_profile.ps1 b/dotfiles/pwsh/powershell_profile.ps1 index b9e0ae5..096a09a 100644 --- a/dotfiles/pwsh/powershell_profile.ps1 +++ b/dotfiles/pwsh/powershell_profile.ps1 @@ -139,7 +139,7 @@ function Enable-SshAgent { .OUTPUTS no outputs #> - sudo Set-Service -Name ssh-agent -StartupType Manual && Start-Service ssh-agent + sudo run pwsh -c "Set-Service -Name ssh-agent -StartupType Manual && Start-Service ssh-agent" } # auto start ssh-agent and do ssh-add function Invoke-SshAdd {