From 6ead12c22a1f2f3028df8a6a6564d45bf367bc64 Mon Sep 17 00:00:00 2001 From: Luke Thomas <96008479+Zoobdude@users.noreply.github.com> Date: Mon, 4 Nov 2024 14:04:45 +0000 Subject: [PATCH] Only install Scoop if not already installed --- main.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.ps1 b/main.ps1 index 3593c8c..52cc299 100644 --- a/main.ps1 +++ b/main.ps1 @@ -85,10 +85,10 @@ try { Remove-Item -Path .\config.json # Install Scoop -try { +if (!(Get-Command "scoop" -errorAction SilentlyContinue)){ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression -} catch { +} else { Write-Output "Skipping scoop install" }