Skip to content

Commit 5a63ca4

Browse files
committed
fix sudo references for latest version of windows 🩹
1 parent e14646e commit 5a63ca4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Profile.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Set-Alias -Name la -Value Get-ChildItemPretty
1919
Set-Alias -Name ll -Value Get-ChildItemPretty
2020
Set-Alias -Name ls -Value Get-ChildItemPretty
2121
Set-Alias -Name rm -Value Remove-ItemExtended
22-
Set-Alias -Name su -Value sudo
22+
Set-Alias -Name su -Value gsudo
2323
Set-Alias -Name tif Show-ThisIsFine
2424
Set-Alias -Name touch -Value New-File
2525
Set-Alias -Name up -Value Update-Profile
@@ -64,7 +64,7 @@ function Update-Profile {
6464

6565
Write-Verbose "Rerunning setup script to capture any new dependencies."
6666
if (Get-Command -Name gsudo -ErrorAction SilentlyContinue) {
67-
sudo ./Setup.ps1
67+
gsudo ./Setup.ps1
6868
}
6969
else {
7070
Start-Process wezterm -Verb runAs -WindowStyle Hidden -ArgumentList "start --cwd $PWD pwsh -NonInteractive -Command ./Setup.ps1"
@@ -83,10 +83,10 @@ function Update-Software {
8383
Updates all software installed via Winget & Chocolatey. Alias: us
8484
#>
8585
Write-Verbose "Updating software installed via Winget & Chocolatey"
86-
sudo cache on
87-
sudo winget upgrade --all --include-unknown --silent --verbose
88-
sudo choco upgrade all -y
89-
sudo -k
86+
gsudo cache on
87+
gsudo winget upgrade --all --include-unknown --silent --verbose
88+
gsudo choco upgrade all -y
89+
gsudo -k
9090
$ENV:SOFTWARE_UPDATE_AVAILABLE = ""
9191
}
9292

0 commit comments

Comments
 (0)