Merge pull request #17 from Baipyrus/fix-path-variable

Wrong Program Variable Used For Path In Install Script
This commit is contained in:
Baipyrus 2024-09-23 18:58:32 +02:00 committed by GitHub
commit f097703beb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -56,8 +56,10 @@ if ($isRelease)
# Add program to PATH for cli application
$userpath = [System.Environment]::GetEnvironmentVariable("PATH", "User")
$userpath = $userpath + ";$programDir"
[System.Environment]::SetEnvironmentVariable("PATH", $userpath, "User")
if ($userpath.Split(";") -notcontains $programPath) {
$userpath = $userpath + ";$programPath"
[System.Environment]::SetEnvironmentVariable("PATH", $userpath, "User")
}
# Create Startmenu Shortcut
Write-Host "Creating shortcuts for easy access..." -ForegroundColor Cyan