Skip to content

Commit a240090

Browse files
committed
Use encoded x3a to represent colon in pwsh
1 parent 3dd1cc2 commit a240090

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,23 @@ if ($env:VSCODE_ENV_REPLACE) {
2525
$Split = $env:VSCODE_ENV_REPLACE.Split(":")
2626
foreach ($Item in $Split) {
2727
$Inner = $Item.Split('=')
28-
[Environment]::SetEnvironmentVariable($Inner[0], $Inner[1])
28+
[Environment]::SetEnvironmentVariable($Inner[0], $Inner[1].Replace('\x3a', ':'))
2929
}
3030
$env:VSCODE_ENV_REPLACE = $null
3131
}
3232
if ($env:VSCODE_ENV_PREPEND) {
3333
$Split = $env:VSCODE_ENV_PREPEND.Split(":")
3434
foreach ($Item in $Split) {
3535
$Inner = $Item.Split('=')
36-
[Environment]::SetEnvironmentVariable($Inner[0], $Inner[1] + [Environment]::GetEnvironmentVariable($Inner[0]))
36+
[Environment]::SetEnvironmentVariable($Inner[0], $Inner[1].Replace('\x3a', ':') + [Environment]::GetEnvironmentVariable($Inner[0]))
3737
}
3838
$env:VSCODE_ENV_PREPEND = $null
3939
}
4040
if ($env:VSCODE_ENV_APPEND) {
4141
$Split = $env:VSCODE_ENV_APPEND.Split(":")
4242
foreach ($Item in $Split) {
4343
$Inner = $Item.Split('=')
44-
[Environment]::SetEnvironmentVariable($Inner[0], [Environment]::GetEnvironmentVariable($Inner[0]) + $Inner[1])
44+
[Environment]::SetEnvironmentVariable($Inner[0], [Environment]::GetEnvironmentVariable($Inner[0]) + $Inner[1].Replace('\x3a', ':'))
4545
}
4646
$env:VSCODE_ENV_APPEND = $null
4747
}

0 commit comments

Comments
 (0)