Skip to content

Commit

Permalink
(chocolatey#548) Remove creation of Chocolatey Install Directory
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AdmiringWorm committed Oct 5, 2023
1 parent 396a105 commit 8ab6cb8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion Boxstarter.TestRunner/Bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
1 change: 0 additions & 1 deletion BuildScripts/bootstrapper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 8ab6cb8

Please sign in to comment.