[DRAFT] PowerShell shell plugins: bug-fix pass
I maintainer di solito rispondono entro 1 giorno
@instinct-vfx ci sta già lavorando.
Dal 24/11/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
This issue is an overarching tracking issue for a bug-fix pass I am doing on the PowerShell plugins. Disclaimer: AI was rather heavily used both in finding potential issues, verifying them, coming up with a plan and checking if there are already reports or PRs.
Everything listed was reproduced with the rez-env and rez-context command line tools of a production install (install.py, Python 3.13) on Windows 11, with Windows PowerShell 5.1 and two versions of pwsh: 7.2.2, and 7.6.10, which is the version on the GitHub Windows runners. The results are the same on both pwsh versions. Not covered: pwsh on Linux and macOS.
New issues
- #TODO(escaping): env values and
info()text are not escaped (backtick, typographic quotes) - #TODO(parse-failure): a context script that fails to parse is ignored and rez exits 0
- #TODO(env-var-separators):
env_var_separatorsis ignored when appending or prepending - #TODO(stale-lastexitcode): exit code of a package command leaks into the exit code of
rez env - #TODO(argument-quoting):
rez env -- <args>mangles arguments containing-x.y,@, a comma or a backtick - #TODO(script-encoding): non-ASCII text is corrupted because generated scripts have no BOM
- #TODO(env-var-regex):
$VARreferences are cut at the first digit in the variable name (core rex, all shells)
The escaping fix has to land before, or together with, the encoding fix. The others are independent of each other.
Existing issues, with new information
-
AcademySoftwareFoundation/rez#1413, eval output joined with
&&. Besides being invalid in Windows PowerShell,&&also loses statements in pwsh 7, because it short-circuits.unsetenv()on a variable that is not set emitsRemove-Item -ErrorAction SilentlyContinue, which leaves$?false, and every statement after it is skipped. Reproduced with a package whosecommands()areunsetenv("NOT_SET")followed byenv.AFTER = "1": after running the output ofrez-context ctx.rxt --interpret --format pwsh --style evalin pwsh 7.2,AFTERis not set. So;is needed in both plugins, not only inpowershell. -
AcademySoftwareFoundation/rez#1406, detached shells.
rez-env --shell pwsh --detached <pkg> -- <command>still fails withFileNotFoundError. There are three separate defects:STARTis acmdbuiltin, soPopenneedsshell=True, ascmd.pyalready does.-NoExitis inserted at index 1, which is before the executable wheneverpre_commandis set.STARTtreats a first quoted argument as the window title, and the default pwsh path contains a space. An empty title has to be inserted:START "" "C:\Program Files\PowerShell\7\pwsh.exe" ....
With all three addressed in a prototype,
rez-env --detachedworks in both editions. -
AcademySoftwareFoundation/rez#1728, alias with a quoted path. Prefixing the call operator only when the alias value starts with a quote fixes the reported case in both editions. Such values are a syntax error today, unless they are a PowerShell expression that begins with a string literal, so this avoids the compatibility risk of adding
&unconditionally.
Already covered by open PRs
resetenv()crashes: AcademySoftwareFoundation/rez#2068, fixed for all shells in AcademySoftwareFoundation/rez#2070.--norcis ignored: AcademySoftwareFoundation/rez#1777 adds-NoProfile. That PR also moves-NoExit, so it overlaps with the fix for AcademySoftwareFoundation/rez#1406.
Not part of this pass
$inrez env -- <args>is expanded by PowerShell: AcademySoftwareFoundation/rez#1803, AcademySoftwareFoundation/rez#1566, AcademySoftwareFoundation/rez#1764. This is a design question, because arguments are double-quoted on purpose.- A
${VAR}reference that rex cannot resolve is written to the script as a PowerShell variable, not an environment variable, so it expands to nothing: AcademySoftwareFoundation/rez#768.
- Lingua principale
- Python
- Stelle
- 1.1k
- Fork
- 370
- Merge medio
- 2g 10h
- PR unite (30g)
- 11
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di AcademySoftwareFoundation/rez
-
difficulty/easy documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
AcademySoftwareFoundation/rez#2239 ·
I maintainer di solito rispondono entro 1 giorno
-
_rez_fwd ++version causes exception with ++versionsForse già presa @ClementHector l’ha presa 73 giorni fa. Apertabug difficulty/medium help wanted rez-suite
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
AcademySoftwareFoundation/rez#2046 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
ASWF documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
AcademySoftwareFoundation/rez#2266 ·
I maintainer di solito rispondono entro 1 giorno
-
Add documentation for context trackingForse già presa @instinct-vfx l’ha presa 8 giorni fa. Apertadocumentation enhancement
AcademySoftwareFoundation/rez#2255 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 1-2 giorni Idoneità per principianti 35/100
AcademySoftwareFoundation/rez#2240 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di AcademySoftwareFoundation/rez
Issue simili
-
factory:subtask
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 94/100
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
shuxiachai/academic-commercialization-agent#533 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
sierra-research/tau2-bench#804 ·
I maintainer di solito rispondono entro 3 giorni
-
bug
Difficoltà 1/5 1-3 ore Idoneità per principianti 91/100
gracecraft-software/lupin#423 · 1 commento ·
-
Event of a rate-limit waitApertaarea:runtime
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno