This removes choco from all installs as it's not needed anymore. Winget has everything.

master
Zed A. Shaw 4 weeks ago
parent 8ef1b1fe2b
commit d67b0407d1
  1. 79
      base.ps1
  2. 29
      bunjs.ps1
  3. 30
      cpp.ps1
  4. 29
      crystal.ps1
  5. 29
      extras.ps1
  6. 29
      go.ps1
  7. 29
      nodejs.ps1
  8. 29
      python.ps1
  9. 29
      ruby.ps1
  10. 29
      rust.ps1
  11. 29
      zig.ps1

@ -2,19 +2,14 @@ function Test-WinUtilPackageManager {
<#
.SYNOPSIS
Checks if Winget and/or Choco are installed
Checks if Winget is installed
.PARAMETER winget
Check if Winget is installed
.PARAMETER choco
Check if Chocolatey is installed
#>
Param(
[System.Management.Automation.SwitchParameter]$winget,
[System.Management.Automation.SwitchParameter]$choco
[System.Management.Automation.SwitchParameter]$winget
)
$status = "not-installed"
@ -78,21 +73,6 @@ function Test-WinUtilPackageManager {
}
}
if ($choco) {
if ((Get-Command -Name choco -ErrorAction Ignore) -and ($chocoVersion = (Get-Item "$env:ChocolateyInstall\choco.exe" -ErrorAction Ignore).VersionInfo.ProductVersion)) {
Write-Host "===========================================" -ForegroundColor Green
Write-Host "--- Chocolatey is installed ---" -ForegroundColor Green
Write-Host "===========================================" -ForegroundColor Green
Write-Host "Version: v$chocoVersion" -ForegroundColor White
$status = "installed"
} else {
Write-Host "===========================================" -ForegroundColor Red
Write-Host "--- Chocolatey is not installed ---" -ForegroundColor Red
Write-Host "===========================================" -ForegroundColor Red
$status = "not-installed"
}
}
return $status
}
@ -206,18 +186,8 @@ function Install-WinUtilWinget {
Write-Output "Refreshing Environment Variables...`n"
$ENV:PATH = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
} Catch {
Write-Host "Failure detected while installing via GitHub method. Continuing with Chocolatey method as fallback." -ForegroundColor Red
# In case install fails via GitHub method.
Try {
# Install Choco if not already present
Install-WinUtilChoco
Start-Process -Verb runas -FilePath powershell.exe -ArgumentList "choco install winget-cli"
Write-Host "Winget Installed" -ForegroundColor Green
Write-Output "Refreshing Environment Variables...`n"
$ENV:PATH = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
} Catch {
throw [WingetFailedInstall]::new('Failed to install!')
}
Write-Host "Failure detected while installing via GitHub method. Your computer cannot run winget. Please email help@learncodethehardway.com to help find out why." -ForegroundColor Red
throw [WingetFailedInstall]::new('Failed to install!')
}
}
@ -235,7 +205,10 @@ if(-not $isAdmin) {
)
}
Write-Warning "About to install winget"
Write-Warning "About to install winget. Winget is a Microsoft open source package manager."
Write-Warning "To install Winget this script will temporarily launch in Administrator mode, then get out of it."
Write-Warning "If you already have Winget then this will only check that you have it, or upgrade it."
Write-Warning "If you'd prefer to not use it then abort now and good luck getting everything installed."
Read-Host -Prompt "Press any key to continue, or CTRL-C to abort" | Out-Null
@ -256,14 +229,11 @@ $installs=@(
'Microsoft.VCRedist.2015+.x64'
)
$choco_installs=@()
Write-Warning "About to install the following software:"
Write-Warning "-----------------------------------------"
foreach($pkg in $installs) { Write-Host $pkg }
foreach($pkg in $choco_installs) { Write-Host $pkg }
Write-Warning "-----------------------------------------"
Write-Warning "This will use winget and chocolatey to do the installs."
Write-Warning "This will use winget to do the installs. If you already have this software installed then winget should only upgrade them. If you don't want this then abort now."
Read-Host -Prompt "Press any key to continue, or CTRL-C to abort" | Out-Null
@ -271,13 +241,36 @@ foreach($pkg in $installs) {
Start-Process -NoNewWindow -Wait winget -ArgumentList 'install',$pkg
}
Write-Warning "!! Installing WinLibs in $env:HOMEPATH\WinLibs"
$winlibsPath = "$env:HOMEDRIVE$env:HOMEPATH\WinLibs"
if(Test-Path -Path $winlibsPath) {
Write-Warning "#=========================================================#"
Write-Warning "!! The directory $winlibsPath already exists, which means"
Write-Warning "!! you already have winlibs installed. Here's the version:"
cat "$winlibsPath\mingw64\version_info.txt"
Write-Warning "#=========================================================#"
Write-Warning "Here's the version that Winget will install:"
winget search BrechtSanders.WinLibs.POSIX.UCRT.LLVM
Write-Warning "--- If you want me to replace your install with this version, then stop and"
Write-Warning "delete the $winlibsPath directory before hitting ENTER to continue."
Write-Warning "!!! If you do NOT want to replace this directory then hit CTRL-C now."
Read-Host -Prompt "Press any key to continue, or CTRL-C to abort" | Out-Null
}
Write-Warning "!! Installing WinLibs in $winlibsPath"
Write-Warning "This has to be installed this way because winget won't add it to the path so I have to do it manually. If you don't want this, then hit CTRL-C and install WinLibs yourself."
Read-Host -Prompt "Press any key to continue, or CTRL-C to abort" | Out-Null
winget install --location "$env:HOMEPATH\WinLibs" -e BrechtSanders.WinLibs.POSIX.UCRT.LLVM
winget install --location "$winlibsPath" -e BrechtSanders.WinLibs.POSIX.UCRT.LLVM
$newPath = $Env:PATH + ";$env:HOMEPATH\WinLibs\mingw64\bin"
[Environment]::SetEnvironmentVariable("Path", $newPath, "User")
if($env:PATH.contains($winlibsPath)) {
Write-Warning "!! Detected $winLibsPath in your PATH. Will not update your PATH."
Write-Warning "!! This is probably because you already installed it. You'll have"
Write-Warning "!! to manually remove this part of your path if you want to change it."
Write-Warning "!! But, it will probably still work since that's where I installed it."
} else {
$newPath = $Env:PATH + ";$winlibsPath\mingw64\bin"
[Environment]::SetEnvironmentVariable("Path", $newPath, "User")
}
Write-Warning "!!! CLOSE THIS POWERSHELL AND START A NEW ONE TO UPDATE PATH!"

@ -2,19 +2,15 @@ function Test-WinUtilPackageManager {
<#
.SYNOPSIS
Checks if Winget and/or Choco are installed
Checks if Winget is installed
.PARAMETER winget
Check if Winget is installed
.PARAMETER choco
Check if Chocolatey is installed
#>
Param(
[System.Management.Automation.SwitchParameter]$winget,
[System.Management.Automation.SwitchParameter]$choco
[System.Management.Automation.SwitchParameter]$winget
)
$status = "not-installed"
@ -78,31 +74,14 @@ function Test-WinUtilPackageManager {
}
}
if ($choco) {
if ((Get-Command -Name choco -ErrorAction Ignore) -and ($chocoVersion = (Get-Item "$env:ChocolateyInstall\choco.exe" -ErrorAction Ignore).VersionInfo.ProductVersion)) {
Write-Host "===========================================" -ForegroundColor Green
Write-Host "--- Chocolatey is installed ---" -ForegroundColor Green
Write-Host "===========================================" -ForegroundColor Green
Write-Host "Version: v$chocoVersion" -ForegroundColor White
$status = "installed"
} else {
Write-Host "===========================================" -ForegroundColor Red
Write-Host "--- Chocolatey is not installed ---" -ForegroundColor Red
Write-Host "===========================================" -ForegroundColor Red
$status = "not-installed"
}
}
return $status
}
function ConfirmBaseRun {
$isWingetInstalled = Test-WinUtilPackageManager -winget
$isChocoInstalled = Test-WinUtilPackageManager -choco
if (!($isWingetInstalled -eq "installed") -or
!($isChocoInstalled -eq "installed")) {
Write-Warning "!!! Either winget or choco is not installed."
if (!($isWingetInstalled -eq "installed")) {
Write-Warning "!!! Winget is not installed."
Write-Host "You haven't run the base.ps1 script yet. Please visit https://learncodethehardway.com/setup/installers.html for more."

@ -2,19 +2,15 @@ function Test-WinUtilPackageManager {
<#
.SYNOPSIS
Checks if Winget and/or Choco are installed
Checks if Winget is installed
.PARAMETER winget
Check if Winget is installed
.PARAMETER choco
Check if Chocolatey is installed
#>
Param(
[System.Management.Automation.SwitchParameter]$winget,
[System.Management.Automation.SwitchParameter]$choco
[System.Management.Automation.SwitchParameter]$winget
)
$status = "not-installed"
@ -78,31 +74,14 @@ function Test-WinUtilPackageManager {
}
}
if ($choco) {
if ((Get-Command -Name choco -ErrorAction Ignore) -and ($chocoVersion = (Get-Item "$env:ChocolateyInstall\choco.exe" -ErrorAction Ignore).VersionInfo.ProductVersion)) {
Write-Host "===========================================" -ForegroundColor Green
Write-Host "--- Chocolatey is installed ---" -ForegroundColor Green
Write-Host "===========================================" -ForegroundColor Green
Write-Host "Version: v$chocoVersion" -ForegroundColor White
$status = "installed"
} else {
Write-Host "===========================================" -ForegroundColor Red
Write-Host "--- Chocolatey is not installed ---" -ForegroundColor Red
Write-Host "===========================================" -ForegroundColor Red
$status = "not-installed"
}
}
return $status
}
function ConfirmBaseRun {
$isWingetInstalled = Test-WinUtilPackageManager -winget
$isChocoInstalled = Test-WinUtilPackageManager -choco
if (!($isWingetInstalled -eq "installed") -or
!($isChocoInstalled -eq "installed")) {
Write-Warning "!!! Either winget or choco is not installed."
if (!($isWingetInstalled -eq "installed")) {
Write-Warning "!!! Winget is not installed."
Write-Host "You haven't run the base.ps1 script yet. Please visit https://learncodethehardway.com/setup/installers.html for more."
@ -115,4 +94,3 @@ ConfirmBaseRun
Start-Process -NoNewWindow -Wait winget -ArgumentList 'install','ezwinports.make'
Start-Process -NoNewWindow -Wait winget -ArgumentList 'install','mesonbuild.meson'
Start-Process -NoNewWindow -Wait winget -ArgumentList 'install','Kitware.CMake'

@ -2,19 +2,15 @@ function Test-WinUtilPackageManager {
<#
.SYNOPSIS
Checks if Winget and/or Choco are installed
Checks if Winget is installed
.PARAMETER winget
Check if Winget is installed
.PARAMETER choco
Check if Chocolatey is installed
#>
Param(
[System.Management.Automation.SwitchParameter]$winget,
[System.Management.Automation.SwitchParameter]$choco
[System.Management.Automation.SwitchParameter]$winget
)
$status = "not-installed"
@ -78,31 +74,14 @@ function Test-WinUtilPackageManager {
}
}
if ($choco) {
if ((Get-Command -Name choco -ErrorAction Ignore) -and ($chocoVersion = (Get-Item "$env:ChocolateyInstall\choco.exe" -ErrorAction Ignore).VersionInfo.ProductVersion)) {
Write-Host "===========================================" -ForegroundColor Green
Write-Host "--- Chocolatey is installed ---" -ForegroundColor Green
Write-Host "===========================================" -ForegroundColor Green
Write-Host "Version: v$chocoVersion" -ForegroundColor White
$status = "installed"
} else {
Write-Host "===========================================" -ForegroundColor Red
Write-Host "--- Chocolatey is not installed ---" -ForegroundColor Red
Write-Host "===========================================" -ForegroundColor Red
$status = "not-installed"
}
}
return $status
}
function ConfirmBaseRun {
$isWingetInstalled = Test-WinUtilPackageManager -winget
$isChocoInstalled = Test-WinUtilPackageManager -choco
if (!($isWingetInstalled -eq "installed") -or
!($isChocoInstalled -eq "installed")) {
Write-Warning "!!! Either winget or choco is not installed."
if (!($isWingetInstalled -eq "installed")) {
Write-Warning "!!! Winget is not installed."
Write-Host "You haven't run the base.ps1 script yet. Please visit https://learncodethehardway.com/setup/installers.html for more."

@ -2,19 +2,15 @@ function Test-WinUtilPackageManager {
<#
.SYNOPSIS
Checks if Winget and/or Choco are installed
Checks if Winget is installed
.PARAMETER winget
Check if Winget is installed
.PARAMETER choco
Check if Chocolatey is installed
#>
Param(
[System.Management.Automation.SwitchParameter]$winget,
[System.Management.Automation.SwitchParameter]$choco
[System.Management.Automation.SwitchParameter]$winget
)
$status = "not-installed"
@ -78,31 +74,14 @@ function Test-WinUtilPackageManager {
}
}
if ($choco) {
if ((Get-Command -Name choco -ErrorAction Ignore) -and ($chocoVersion = (Get-Item "$env:ChocolateyInstall\choco.exe" -ErrorAction Ignore).VersionInfo.ProductVersion)) {
Write-Host "===========================================" -ForegroundColor Green
Write-Host "--- Chocolatey is installed ---" -ForegroundColor Green
Write-Host "===========================================" -ForegroundColor Green
Write-Host "Version: v$chocoVersion" -ForegroundColor White
$status = "installed"
} else {
Write-Host "===========================================" -ForegroundColor Red
Write-Host "--- Chocolatey is not installed ---" -ForegroundColor Red
Write-Host "===========================================" -ForegroundColor Red
$status = "not-installed"
}
}
return $status
}
function ConfirmBaseRun {
$isWingetInstalled = Test-WinUtilPackageManager -winget
$isChocoInstalled = Test-WinUtilPackageManager -choco
if (!($isWingetInstalled -eq "installed") -or
!($isChocoInstalled -eq "installed")) {
Write-Warning "!!! Either winget or choco is not installed."
if (!($isWingetInstalled -eq "installed")) {
Write-Warning "!!! Winget is not installed."
Write-Host "You haven't run the base.ps1 script yet. Please visit https://learncodethehardway.com/setup/installers.html for more."

@ -2,19 +2,15 @@ function Test-WinUtilPackageManager {
<#
.SYNOPSIS
Checks if Winget and/or Choco are installed
Checks if Winget is installed
.PARAMETER winget
Check if Winget is installed
.PARAMETER choco
Check if Chocolatey is installed
#>
Param(
[System.Management.Automation.SwitchParameter]$winget,
[System.Management.Automation.SwitchParameter]$choco
[System.Management.Automation.SwitchParameter]$winget
)
$status = "not-installed"
@ -78,31 +74,14 @@ function Test-WinUtilPackageManager {
}
}
if ($choco) {
if ((Get-Command -Name choco -ErrorAction Ignore) -and ($chocoVersion = (Get-Item "$env:ChocolateyInstall\choco.exe" -ErrorAction Ignore).VersionInfo.ProductVersion)) {
Write-Host "===========================================" -ForegroundColor Green
Write-Host "--- Chocolatey is installed ---" -ForegroundColor Green
Write-Host "===========================================" -ForegroundColor Green
Write-Host "Version: v$chocoVersion" -ForegroundColor White
$status = "installed"
} else {
Write-Host "===========================================" -ForegroundColor Red
Write-Host "--- Chocolatey is not installed ---" -ForegroundColor Red
Write-Host "===========================================" -ForegroundColor Red
$status = "not-installed"
}
}
return $status
}
function ConfirmBaseRun {
$isWingetInstalled = Test-WinUtilPackageManager -winget
$isChocoInstalled = Test-WinUtilPackageManager -choco
if (!($isWingetInstalled -eq "installed") -or
!($isChocoInstalled -eq "installed")) {
Write-Warning "!!! Either winget or choco is not installed."
if (!($isWingetInstalled -eq "installed")) {
Write-Warning "!!! Winget is not installed."
Write-Host "You haven't run the base.ps1 script yet. Please visit https://learncodethehardway.com/setup/installers.html for more."

@ -2,19 +2,15 @@ function Test-WinUtilPackageManager {
<#
.SYNOPSIS
Checks if Winget and/or Choco are installed
Checks if Winget is installed
.PARAMETER winget
Check if Winget is installed
.PARAMETER choco
Check if Chocolatey is installed
#>
Param(
[System.Management.Automation.SwitchParameter]$winget,
[System.Management.Automation.SwitchParameter]$choco
[System.Management.Automation.SwitchParameter]$winget
)
$status = "not-installed"
@ -78,31 +74,14 @@ function Test-WinUtilPackageManager {
}
}
if ($choco) {
if ((Get-Command -Name choco -ErrorAction Ignore) -and ($chocoVersion = (Get-Item "$env:ChocolateyInstall\choco.exe" -ErrorAction Ignore).VersionInfo.ProductVersion)) {
Write-Host "===========================================" -ForegroundColor Green
Write-Host "--- Chocolatey is installed ---" -ForegroundColor Green
Write-Host "===========================================" -ForegroundColor Green
Write-Host "Version: v$chocoVersion" -ForegroundColor White
$status = "installed"
} else {
Write-Host "===========================================" -ForegroundColor Red
Write-Host "--- Chocolatey is not installed ---" -ForegroundColor Red
Write-Host "===========================================" -ForegroundColor Red
$status = "not-installed"
}
}
return $status
}
function ConfirmBaseRun {
$isWingetInstalled = Test-WinUtilPackageManager -winget
$isChocoInstalled = Test-WinUtilPackageManager -choco
if (!($isWingetInstalled -eq "installed") -or
!($isChocoInstalled -eq "installed")) {
Write-Warning "!!! Either winget or choco is not installed."
if (!($isWingetInstalled -eq "installed")) {
Write-Warning "!!! Winget is not installed."
Write-Host "You haven't run the base.ps1 script yet. Please visit https://learncodethehardway.com/setup/installers.html for more."

@ -2,19 +2,15 @@ function Test-WinUtilPackageManager {
<#
.SYNOPSIS
Checks if Winget and/or Choco are installed
Checks if Winget is installed
.PARAMETER winget
Check if Winget is installed
.PARAMETER choco
Check if Chocolatey is installed
#>
Param(
[System.Management.Automation.SwitchParameter]$winget,
[System.Management.Automation.SwitchParameter]$choco
[System.Management.Automation.SwitchParameter]$winget
)
$status = "not-installed"
@ -78,31 +74,14 @@ function Test-WinUtilPackageManager {
}
}
if ($choco) {
if ((Get-Command -Name choco -ErrorAction Ignore) -and ($chocoVersion = (Get-Item "$env:ChocolateyInstall\choco.exe" -ErrorAction Ignore).VersionInfo.ProductVersion)) {
Write-Host "===========================================" -ForegroundColor Green
Write-Host "--- Chocolatey is installed ---" -ForegroundColor Green
Write-Host "===========================================" -ForegroundColor Green
Write-Host "Version: v$chocoVersion" -ForegroundColor White
$status = "installed"
} else {
Write-Host "===========================================" -ForegroundColor Red
Write-Host "--- Chocolatey is not installed ---" -ForegroundColor Red
Write-Host "===========================================" -ForegroundColor Red
$status = "not-installed"
}
}
return $status
}
function ConfirmBaseRun {
$isWingetInstalled = Test-WinUtilPackageManager -winget
$isChocoInstalled = Test-WinUtilPackageManager -choco
if (!($isWingetInstalled -eq "installed") -or
!($isChocoInstalled -eq "installed")) {
Write-Warning "!!! Either winget or choco is not installed."
if (!($isWingetInstalled -eq "installed")) {
Write-Warning "!!! Winget is not installed."
Write-Host "You haven't run the base.ps1 script yet. Please visit https://learncodethehardway.com/setup/installers.html for more."

@ -2,19 +2,15 @@ function Test-WinUtilPackageManager {
<#
.SYNOPSIS
Checks if Winget and/or Choco are installed
Checks if Winget is installed
.PARAMETER winget
Check if Winget is installed
.PARAMETER choco
Check if Chocolatey is installed
#>
Param(
[System.Management.Automation.SwitchParameter]$winget,
[System.Management.Automation.SwitchParameter]$choco
[System.Management.Automation.SwitchParameter]$winget
)
$status = "not-installed"
@ -78,31 +74,14 @@ function Test-WinUtilPackageManager {
}
}
if ($choco) {
if ((Get-Command -Name choco -ErrorAction Ignore) -and ($chocoVersion = (Get-Item "$env:ChocolateyInstall\choco.exe" -ErrorAction Ignore).VersionInfo.ProductVersion)) {
Write-Host "===========================================" -ForegroundColor Green
Write-Host "--- Chocolatey is installed ---" -ForegroundColor Green
Write-Host "===========================================" -ForegroundColor Green
Write-Host "Version: v$chocoVersion" -ForegroundColor White
$status = "installed"
} else {
Write-Host "===========================================" -ForegroundColor Red
Write-Host "--- Chocolatey is not installed ---" -ForegroundColor Red
Write-Host "===========================================" -ForegroundColor Red
$status = "not-installed"
}
}
return $status
}
function ConfirmBaseRun {
$isWingetInstalled = Test-WinUtilPackageManager -winget
$isChocoInstalled = Test-WinUtilPackageManager -choco
if (!($isWingetInstalled -eq "installed") -or
!($isChocoInstalled -eq "installed")) {
Write-Warning "!!! Either winget or choco is not installed."
if (!($isWingetInstalled -eq "installed")) {
Write-Warning "!!! Winget is not installed."
Write-Host "You haven't run the base.ps1 script yet. Please visit https://learncodethehardway.com/setup/installers.html for more."

@ -2,19 +2,15 @@ function Test-WinUtilPackageManager {
<#
.SYNOPSIS
Checks if Winget and/or Choco are installed
Checks if Winget is installed
.PARAMETER winget
Check if Winget is installed
.PARAMETER choco
Check if Chocolatey is installed
#>
Param(
[System.Management.Automation.SwitchParameter]$winget,
[System.Management.Automation.SwitchParameter]$choco
[System.Management.Automation.SwitchParameter]$winget
)
$status = "not-installed"
@ -78,31 +74,14 @@ function Test-WinUtilPackageManager {
}
}
if ($choco) {
if ((Get-Command -Name choco -ErrorAction Ignore) -and ($chocoVersion = (Get-Item "$env:ChocolateyInstall\choco.exe" -ErrorAction Ignore).VersionInfo.ProductVersion)) {
Write-Host "===========================================" -ForegroundColor Green
Write-Host "--- Chocolatey is installed ---" -ForegroundColor Green
Write-Host "===========================================" -ForegroundColor Green
Write-Host "Version: v$chocoVersion" -ForegroundColor White
$status = "installed"
} else {
Write-Host "===========================================" -ForegroundColor Red
Write-Host "--- Chocolatey is not installed ---" -ForegroundColor Red
Write-Host "===========================================" -ForegroundColor Red
$status = "not-installed"
}
}
return $status
}
function ConfirmBaseRun {
$isWingetInstalled = Test-WinUtilPackageManager -winget
$isChocoInstalled = Test-WinUtilPackageManager -choco
if (!($isWingetInstalled -eq "installed") -or
!($isChocoInstalled -eq "installed")) {
Write-Warning "!!! Either winget or choco is not installed."
if (!($isWingetInstalled -eq "installed")) {
Write-Warning "!!! Winget is not installed."
Write-Host "You haven't run the base.ps1 script yet. Please visit https://learncodethehardway.com/setup/installers.html for more."

@ -2,19 +2,15 @@ function Test-WinUtilPackageManager {
<#
.SYNOPSIS
Checks if Winget and/or Choco are installed
Checks if Winget is installed
.PARAMETER winget
Check if Winget is installed
.PARAMETER choco
Check if Chocolatey is installed
#>
Param(
[System.Management.Automation.SwitchParameter]$winget,
[System.Management.Automation.SwitchParameter]$choco
[System.Management.Automation.SwitchParameter]$winget
)
$status = "not-installed"
@ -78,31 +74,14 @@ function Test-WinUtilPackageManager {
}
}
if ($choco) {
if ((Get-Command -Name choco -ErrorAction Ignore) -and ($chocoVersion = (Get-Item "$env:ChocolateyInstall\choco.exe" -ErrorAction Ignore).VersionInfo.ProductVersion)) {
Write-Host "===========================================" -ForegroundColor Green
Write-Host "--- Chocolatey is installed ---" -ForegroundColor Green
Write-Host "===========================================" -ForegroundColor Green
Write-Host "Version: v$chocoVersion" -ForegroundColor White
$status = "installed"
} else {
Write-Host "===========================================" -ForegroundColor Red
Write-Host "--- Chocolatey is not installed ---" -ForegroundColor Red
Write-Host "===========================================" -ForegroundColor Red
$status = "not-installed"
}
}
return $status
}
function ConfirmBaseRun {
$isWingetInstalled = Test-WinUtilPackageManager -winget
$isChocoInstalled = Test-WinUtilPackageManager -choco
if (!($isWingetInstalled -eq "installed") -or
!($isChocoInstalled -eq "installed")) {
Write-Warning "!!! Either winget or choco is not installed."
if (!($isWingetInstalled -eq "installed")) {
Write-Warning "!!! Winget is not installed."
Write-Host "You haven't run the base.ps1 script yet. Please visit https://learncodethehardway.com/setup/installers.html for more."

Loading…
Cancel
Save