Merge pull request #1216 from HollowMan6/install

Make powershell Windows installation user path available immediately
This commit is contained in:
David Wertenteil
2023-05-03 10:58:47 +03:00
committed by GitHub
+5 -2
View File
@@ -29,8 +29,11 @@ $currentPath = [Environment]::GetEnvironmentVariable("Path", "User")
if (-not $currentPath.Contains($BASE_DIR)) {
$confirmation = Read-Host "Add kubescape to user path? (y/n)"
if ($confirmation -eq 'y') {
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";$BASE_DIR;", "User")
$env:Path=[Environment]::GetEnvironmentVariable("Path", "User") + ";$BASE_DIR;"
[Environment]::SetEnvironmentVariable("Path", "${env:Path}", "User")
}
}
Write-Host "Finished Installation" -ForegroundColor Green
Write-Host "Finished Installation.`n" -ForegroundColor Green
kubescape version
Write-Host "`nUsage: $ kubescape scan --enable-host-scan" -ForegroundColor Magenta