diff --git a/Scripts/install-github-cli.ps1 b/Scripts/install-github-cli.ps1 index 5fdd72a5..2454489d 100755 --- a/Scripts/install-github-cli.ps1 +++ b/Scripts/install-github-cli.ps1 @@ -20,9 +20,6 @@ try { if ($IsMacOS) { & brew install gh } elseif ($IsLinux) { - & curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null - & sudo apt update & sudo apt install gh } else { & winget install --id GitHub.cli diff --git a/Scripts/uninstall-github-cli.ps1 b/Scripts/uninstall-github-cli.ps1 index a29a1ebc..54cc3491 100644 --- a/Scripts/uninstall-github-cli.ps1 +++ b/Scripts/uninstall-github-cli.ps1 @@ -17,7 +17,13 @@ try { "⏳ Uninstalling GitHub CLI..." $StopWatch = [system.diagnostics.stopwatch]::startNew() - & winget uninstall --id GitHub.cli + if ($IsMacOS) { + & brew uninstall gh + } elseif ($IsLinux) { + & sudo apt remote gh + } else { + & winget uninstall --id GitHub.cli + } if ($lastExitCode -ne "0") { throw "Can't uninstall GitHub CLI, is it installed?" } [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds