From 775598b3d70a704321c53239f686918696ba1652 Mon Sep 17 00:00:00 2001 From: Peter Mounce Date: Tue, 6 Jun 2017 05:26:06 -0400 Subject: Chocolatey install: fix script. problem on reading. Closes #2794. PiperOrigin-RevId: 158117701 --- scripts/packages/chocolatey/tools/chocolateyinstall.ps1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts/packages') 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" -- cgit v1.2.3