Skip to content

Commit

Permalink
(datagrip)(chocolatey-community#2257) Fix installation folder
Browse files Browse the repository at this point in the history
The workaround, and folder having to be created before the installer is run, can be removed as the issue has been fixed.
  • Loading branch information
pauby committed Jul 22, 2023
1 parent e8b75fb commit 763d102
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions automatic/datagrip/tools/ChocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@

$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"

# Workaround for https://youtrack.jetbrains.com/issue/IDEA-202935
$programFiles = (${env:ProgramFiles(x86)}, ${env:ProgramFiles} -ne $null)[0]
$pp = Get-PackageParameters

$installDir = "$programFiles\JetBrains\DataGrip $env:ChocolateyPackageVersion"
$silentArgs = "/S /CONFIG=$toolsDir\silent.config "
if ($pp.InstallDir) {
$installDir = $pp.InstallDir
# note there are no quotes around the installDir
# (taken from https://www.jetbrains.com/help/datagrip/2023.1/installation-guide.html#silent):
# /D: Specify the path to the installation directory
# This parameter must be the last in the command line, and it should not contain any quotes even if the path contains blank spaces.
$silentArgs += "/D=$($pp.InstallDir)"
}

$silentArgs = "/S /CONFIG=$toolsDir\silent.config "
$silentArgs += "/D=`"$installDir`""

New-Item -ItemType Directory -Force -Path $installDir

$arguments = @{
packageName = $env:ChocolateyPackageName
softwareName = 'JetBrains DataGrip*'
Expand Down

0 comments on commit 763d102

Please sign in to comment.