Fixing powershell web request to string before trim.
@@ -37,7 +37,7 @@ $EnvHomeTempFolder = "$HOME\tmp"
# DETECT_CURL_OPTS=--proxy http://myproxy:3128
#$DetectGetOpts = Get-EnvironmentVariable -Key "DETECT_CURL_OPTS" -DefaultValue "";
-$Version = "0.1.7"
+$Version = "0.1.8"
$DetectReleaseBaseUrl = "https://test-repo.blackducksoftware.com/artifactory/bds-integrations-release/com/blackducksoftware/integration/hub-detect"
$DetectSnapshotBaseUrl = "https://test-repo.blackducksoftware.com/artifactory/bds-integrations-snapshot/com/blackducksoftware/integration/hub-detect"
@@ -78,7 +78,7 @@ function Get-DetectSnapshotJar ($DetectFolder, $DetectVersion) {
$DetectJarExists = Test-Path $DetectJarFile
$DetectCurrentCommitFileExists = Test-Path $DetectCurrentCommitFile
$DetectLatestCommit = Invoke-WebRequest $DetectCommitUrl
- $DetectLatestCommit = $DetectLatestCommit.Trim()
+ $DetectLatestCommit = $DetectLatestCommit.ToString().Trim()
Write-Host "Detect jar exists '$DetectJarExists', commit file exists '$DetectCurrentCommitFileExists', latest commit '$DetectLatestCommit'"
$Download = $TRUE;
