Skip to content
This repository was archived by the owner on Jan 10, 2024. It is now read-only.

Commit 2123127

Browse files
just fix the goddam bug
1 parent ac86e90 commit 2123127

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/GeneralFunctions.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
$version = "1.0.0-beta.8"
44
$build = (Get-CimInstance Win32_OperatingSystem).version
55
$winver = (Get-WmiObject -class Win32_OperatingSystem).Caption
6-
6+
$chocoinstalled = Get-Command -Name choco.exe -ErrorAction SilentlyContinue
77

88
function setup {
99
if ($winver -like "*Windows 11*") {
@@ -47,7 +47,7 @@ function Info {
4747
}
4848

4949
function InstallChoco {
50-
if (Get-Command -Name choco.exe -ErrorAction -eq $null) {
50+
if ($chocoinstalled -eq $null) {
5151
Write-Output "Seems Chocolatey is not installed, installing now"
5252
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
5353
refreshenv

0 commit comments

Comments
 (0)