Skip to content

Commit

Permalink
Merge pull request #2258 from pauby/datagrip/fix-install-folder
Browse files Browse the repository at this point in the history
(datagrip) Fix installation folder
  • Loading branch information
JPRuskin authored Jun 14, 2024
2 parents 30d0027 + 763d102 commit bab63a6
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 bab63a6

Please sign in to comment.