mirror of
https://github.com/kubescape/kubescape.git
synced 2026-04-15 06:58:11 +00:00
Merge pull request #1216 from HollowMan6/install
Make powershell Windows installation user path available immediately
This commit is contained in:
+5
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user