Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,10 @@ irm https://releases.codebahn.net/cli/install.ps1 | iex
```

This downloads the latest binary, verifies its SHA256 checksum and GPG
signature (if gpg is installed), and installs to
`%LOCALAPPDATA%\Programs\codebahn`. Override with `$env:INSTALL_DIR`.

After install, add the directory to your PATH if the script warns it is
missing:

```powershell
[Environment]::SetEnvironmentVariable('Path', "$env:LOCALAPPDATA\Programs\codebahn;$([Environment]::GetEnvironmentVariable('Path', 'User'))", 'User')
```
signature (if gpg is installed), installs to
`%LOCALAPPDATA%\Programs\codebahn`, and adds it to your PATH.
Override the install location with `$env:INSTALL_DIR`. Restart your
terminal after install.

### From source

Expand Down
8 changes: 4 additions & 4 deletions scripts/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ function Install-Codebahn {

$userPath = [Environment]::GetEnvironmentVariable('Path', 'User')
if ($userPath -notlike "*$InstallDir*") {
Write-Host ''
Write-Host "Warning: $InstallDir is not in your PATH."
Write-Host "Add it with: `$env:Path = `"$InstallDir;`$env:Path`""
Write-Host "Or permanently: [Environment]::SetEnvironmentVariable('Path', `"$InstallDir;`$([Environment]::GetEnvironmentVariable('Path', 'User'))`", 'User')"
[Environment]::SetEnvironmentVariable('Path', "$InstallDir;$userPath", 'User')
$env:Path = "$InstallDir;$env:Path"
Write-Host "Added $InstallDir to your PATH."
Write-Host 'Restart your terminal for the change to take effect in new sessions.'
}
}
finally {
Expand Down
Loading