Skip to content

Commit

Permalink
fix(install): update PATH envvar on pwsh script (railwayapp#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
nebulatgs authored Oct 1, 2022
1 parent 28cde87 commit dd7fd07
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ tar.exe xf $NixpacksZip -C $BinDir

Remove-Item $NixpacksZip

if (($Env:Path -contains "nixpacks")) {
$Env:Path += ";$BinDir"
$User = [EnvironmentVariableTarget]::User
$Path = [Environment]::GetEnvironmentVariable('Path', $User)
if (!(";$Path;".ToLower() -like "*;$BinDir;*".ToLower())) {
[Environment]::SetEnvironmentVariable('Path', "$Path;$BinDir", $User)
$Env:Path += ";$BinDir"
}

Write-Output "Nixpacks was installed successfully to $NixpacksExe"
Write-Output "Run 'nixpacks --help' to get started"

0 comments on commit dd7fd07

Please sign in to comment.