Skip to content

Commit

Permalink
fix sudo references for latest version of windows 🩹
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmckendry committed Dec 22, 2024
1 parent e14646e commit 5a63ca4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Profile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Set-Alias -Name la -Value Get-ChildItemPretty
Set-Alias -Name ll -Value Get-ChildItemPretty
Set-Alias -Name ls -Value Get-ChildItemPretty
Set-Alias -Name rm -Value Remove-ItemExtended
Set-Alias -Name su -Value sudo
Set-Alias -Name su -Value gsudo
Set-Alias -Name tif Show-ThisIsFine
Set-Alias -Name touch -Value New-File
Set-Alias -Name up -Value Update-Profile
Expand Down Expand Up @@ -64,7 +64,7 @@ function Update-Profile {

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

Expand Down

0 comments on commit 5a63ca4

Please sign in to comment.