Moving powershell get-variable.
#Detect Powershell Script
-#Recommended Invocation: powershell "iwr https://blackducksoftware.github.io/hub-detect/hub-detect-ps.ps1?$(Get-Random) | iex; detect"
+#Recommended Invocation: powershell "iwr https://blackducksoftware.github.io/hub-detect/hub-detect.ps1?$(Get-Random) | iex; detect"
+
+function Get-EnvironmentVariable($Key, $DefaultValue) { if (-not (Test-Path Env:$Key)) { return $DefaultValue; }else{ return Get-ChildItem Env:$Key; } }
# DETECT_LATEST_RELEASE_VERSION should be set in your
# environment if you wish to use a version different
@@ -164,11 +166,3 @@ function Receive-DetectJar ($DetectUrl, $DetectJarFile) {
Invoke-WebRequest $DetectUrl -OutFile $DetectJarFile | Out-Null #Pipe to Out-Null to prevent dirtying to the function output
Write-Host "Downloaded detect jar."
}
-
-function Get-EnvironmentVariable($Key, $DefaultValue) {
- if (-not (Test-Path Env:$Key)) {
- return $DefaultValue;
- }else{
- return Get-ChildItem Env:$Key;
- }
-}
