diff options
author | Peter Mounce <petermounce@improbable.io> | 2017-06-06 05:26:06 -0400 |
---|---|---|
committer | John Cater <jcater@google.com> | 2017-06-06 09:50:56 -0400 |
commit | 775598b3d70a704321c53239f686918696ba1652 (patch) | |
tree | 2c23fc84639990c7f7138ede9ac4bc14d62def78 /scripts/packages | |
parent | a2194e580c4c6a0325a0531d8ef170f78dd6f415 (diff) |
Chocolatey install: fix script. problem on
reading.
Closes #2794.
PiperOrigin-RevId: 158117701
Diffstat (limited to 'scripts/packages')
-rw-r--r-- | scripts/packages/chocolatey/tools/chocolateyinstall.ps1 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/packages/chocolatey/tools/chocolateyinstall.ps1 b/scripts/packages/chocolatey/tools/chocolateyinstall.ps1 index 6b91e1a3d2..e546c63648 100644 --- a/scripts/packages/chocolatey/tools/chocolateyinstall.ps1 +++ b/scripts/packages/chocolatey/tools/chocolateyinstall.ps1 @@ -2,18 +2,18 @@ $ErrorActionPreference = 'Stop'; # stop on all errors $packageName = 'bazel' $toolsDir = Split-Path -parent $MyInvocation.MyCommand.Definition -$paramsText = get-content "$($toolsDir)\params.txt" +$raw = get-content "$($toolsDir)\params.txt" | out-string write-host "Content of $($toolsDir)\params.txt:" -write-host $paramsText -write-host "url: $($paramsText[0])" -write-host "hash: $($paramsText[1])" -write-host "Type: $($paramsText.GetType())" +write-host $raw +$params = $raw -split "`n" +write-host "url: $($params[0].Trim())" +write-host "hash: $($params[1].Trim())" $packageDir = Split-Path -parent $toolsDir Install-ChocolateyZipPackage -PackageName "$packageName" ` - -Url64bit "$($paramsText[0])" ` - -Checksum64 "$($paramsText[1])" ` + -Url64bit "$($params[0].Trim())" ` + -Checksum64 "$($params[1].Trim())" ` -ChecksumType64 "sha256" ` -UnzipLocation "$packageDir" |