mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-18 18:56:28 +00:00
how about this impressive construction?
previous version was constructing the value string wrong
This commit is contained in:
parent
139a329b38
commit
66177ae28e
@ -207,11 +207,15 @@ jobs:
|
|||||||
command: |
|
command: |
|
||||||
# The Python for which we installed subunit is not necessarily on
|
# The Python for which we installed subunit is not necessarily on
|
||||||
# %PATH% so put it there.
|
# %PATH% so put it there.
|
||||||
# gets tools from packages we install.
|
|
||||||
$p = py -<<parameters.pythonVersion>> -c "import sys; print(sys.prefix)"
|
$p = py -<<parameters.pythonVersion>> -c "import sys; print(sys.prefix)"
|
||||||
|
$q = py -<<parameters.pythonVersion>> -c "import sysconfig; print(sysconfig.get_path('scripts'))"
|
||||||
|
|
||||||
New-Item $Profile.CurrentUserAllHosts -Force
|
New-Item $Profile.CurrentUserAllHosts -Force
|
||||||
# $p gets "python" on PATH and $p\Scripts
|
# $p gets "python" on PATH and $q gets tools from packages we
|
||||||
Add-Content -Path $Profile.CurrentUserAllHosts -Value '$env:PATH = "$p;$p\Scripts;$env:PATH"'
|
# install. Note we carefully construct the string so that
|
||||||
|
# $env:PATH is not substituted now but $p and $q are. ` is the
|
||||||
|
# PowerShell string escape character.
|
||||||
|
Add-Content -Path $Profile.CurrentUserAllHosts -Value "`$env:PATH = `"$p;$q;`$env:PATH`"'
|
||||||
|
|
||||||
- "run":
|
- "run":
|
||||||
name: "Reveal $env:PATH"
|
name: "Reveal $env:PATH"
|
||||||
|
Loading…
Reference in New Issue
Block a user