From 9a2eb46f6552fe8e70f00813a65964848c7884e5 Mon Sep 17 00:00:00 2001 From: Hollow Man Date: Tue, 2 May 2023 00:23:01 +0300 Subject: [PATCH] Make powershell Windows installation user path available immediately Signed-off-by: Hollow Man --- install.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install.ps1 b/install.ps1 index e2916fc1..44cbe9a5 100644 --- a/install.ps1 +++ b/install.ps1 @@ -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