Skip to content

Commit

Permalink
Merge pull request #180 from xadozuk/fix/cchocoinstaller-create-dir
Browse files Browse the repository at this point in the history
[cChocoInstaller] Do not create install dir prior to calling install.ps1 script
  • Loading branch information
vexx32 authored Oct 5, 2023
2 parents 69e2587 + 0e8dfdf commit f20e162
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions DSCResources/cChocoInstaller/cChocoInstaller.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,6 @@ Function Install-Chocolatey {
)
Write-Verbose 'Install-Chocolatey'

#Create install directory if it does not exist
If(-not (Test-Path -Path $InstallDir)) {
Write-Verbose "[ChocoInstaller] Creating $InstallDir"
New-Item -Path $InstallDir -ItemType Directory
}

#Set permanent EnvironmentVariable
Write-Verbose 'Setting ChocolateyInstall environment variables'
[Environment]::SetEnvironmentVariable('ChocolateyInstall', $InstallDir, [EnvironmentVariableTarget]::Machine)
Expand Down

0 comments on commit f20e162

Please sign in to comment.