diff options
author | Peter Mounce <petermounce@improbable.io> | 2016-11-07 12:34:50 +0000 |
---|---|---|
committer | Klaus Aehlig <aehlig@google.com> | 2016-11-07 14:02:02 +0000 |
commit | 754a84bbc5c316f99de70e4dbf37b7eb4d6ac4bc (patch) | |
tree | 010005b9576fa1186c842c3242bfcb48102c12bf /scripts/packages/chocolatey | |
parent | efdfff2aecdf4584b9ddda40ba1d8f106167b1e0 (diff) |
Fix chocolatey package hard-coding c: drive
This fixes #2032.
Closes #2046.
--
Reviewed-on: https://github.com/bazelbuild/bazel/pull/2046
MOS_MIGRATED_REVID=138377177
Diffstat (limited to 'scripts/packages/chocolatey')
-rw-r--r-- | scripts/packages/chocolatey/tools/chocolateyinstall.ps1 | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/packages/chocolatey/tools/chocolateyinstall.ps1 b/scripts/packages/chocolatey/tools/chocolateyinstall.ps1 index 9afd433d8e..fbd3cc32b0 100644 --- a/scripts/packages/chocolatey/tools/chocolateyinstall.ps1 +++ b/scripts/packages/chocolatey/tools/chocolateyinstall.ps1 @@ -2,13 +2,14 @@ $ErrorActionPreference = 'Stop'; # stop on all errors $packageName = 'bazel' $toolsDir = Split-Path -parent $MyInvocation.MyCommand.Definition -$p = ((gc "$toolsDir\params.json") -join "`n") | convertfrom-json +$json = gc "$toolsDir\params.json" +$p = (($json) -join "`n") | convertfrom-json $packageDir = Split-Path -parent $toolsDir $binRoot = (Get-ToolsLocation) -replace "\\", "/" write-host "Read params from json" -write-host $p +write-host (convertto-json $p) Install-ChocolateyZipPackage -PackageName "$packageName" ` -Url "$($p.package.uri)" ` @@ -50,7 +51,7 @@ if ($packageParameters) } Install-ChocolateyPath -PathToInstall "$msys2Path\usr\bin" -PathType "Machine" -$addToMsysPath = ($packageDir -replace 'c:\\','/c/') -replace '\\','/' +$addToMsysPath = ($packageDir -replace '^([a-zA-Z]):\\(.*)','/$1/$2') -replace '\\','/' write-host @" bazel installed to $packageDir |