Skip to content

Commit c0a1a56

Browse files
Fix PowerShell script PATH variable escaping (#68)
- Escape $PATH variable properly to generate literal $ in bash export command - Prevents PowerShell from trying to interpret $PATH as PowerShell variable
1 parent 7fa82ec commit c0a1a56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

install.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ try {
163163
elseif (Test-Path ~/.bashrc) { "~/.bashrc" }
164164
else { "~/.profile" }
165165

166-
$PathLine = "export PATH=`"$InstallPath:`${PATH}`""
166+
$PathLine = "export PATH=`"$InstallPath:\`$PATH`""
167167

168168
if (-not (Get-Content $ShellProfile -ErrorAction SilentlyContinue | Select-String -Pattern [regex]::Escape($InstallPath))) {
169169
Add-Content -Path $ShellProfile -Value $PathLine

0 commit comments

Comments
 (0)