From 8ab6cb85c01fbd69df6d85d020bacb0b6af7359e Mon Sep 17 00:00:00 2001 From: AdmiringWorm Date: Thu, 5 Oct 2023 17:25:27 +0200 Subject: [PATCH] (#548) Remove creation of Chocolatey Install Directory This commit removes the manal creation of the Chocolatey CLI directory where the application will be installed to. This is done as a change in the Chocolatey CLI script have changed so that if the directory exists, Chocolatey CLI will fail to install. This manual creation may have been needed some time in the past, but has not been needed for several years now. We should not create anything that is not needed to be created, and rely on the installation script instead to know what to set up for its own installation. --- Boxstarter.TestRunner/Bootstrap.ps1 | 1 - BuildScripts/bootstrapper.ps1 | 1 - 2 files changed, 2 deletions(-) diff --git a/Boxstarter.TestRunner/Bootstrap.ps1 b/Boxstarter.TestRunner/Bootstrap.ps1 index 77045c6d..c3e7dd65 100644 --- a/Boxstarter.TestRunner/Bootstrap.ps1 +++ b/Boxstarter.TestRunner/Bootstrap.ps1 @@ -2,7 +2,6 @@ function Bootstrap-Boxstarter { if(-not $env:ChocolateyInstall -or -not (Test-Path "$env:ChocolateyInstall")){ Write-Output "Chocolatey not installed. Downloading and installing..." $env:ChocolateyInstall = "$env:programdata\chocolatey" - New-Item $env:ChocolateyInstall -Force -type directory | Out-Null Get-HttpToFile "https://chocolatey.org/install.ps1" "$env:temp\choco.ps1" . "$env:temp\choco.ps1" } diff --git a/BuildScripts/bootstrapper.ps1 b/BuildScripts/bootstrapper.ps1 index 625fcec1..645baf75 100644 --- a/BuildScripts/bootstrapper.ps1 +++ b/BuildScripts/bootstrapper.ps1 @@ -82,7 +82,6 @@ function Check-Chocolatey { } try { $env:ChocolateyInstall = "$env:programdata\chocolatey" - New-Item $env:ChocolateyInstall -Force -type directory | Out-Null $url="https://chocolatey.org/api/v2/package/chocolatey/" $wc=new-object net.webclient $wp=[system.net.WebProxy]::GetDefaultProxy()