rez-windows-platform
БесплатноБез исполняемых скриптовНе проверенRunning rez on Windows — why only cmd, gitbash, powershell and pwsh are registered there and how the default is picked, the path-separator trap where cmd and…
от loonghao349 установок в других каталогахОб этом скилле
Rez on Windows
One-sentence summary: on Windows rez registers only
cmd,gitbash,powershellandpwshas shells, and those shells disagree about the path separator —cmdandpwshjoin lists with;whilegitbashjoins them with:— which is why the samepackage.pycan produce a workingPATHin one shell and a broken one in another.
Skill scope: the Windows-specific differences. For the commands() body and the rex API in
general see rez-package-commands; for package.py attributes see rez-package-definition; for
config layering and plugin discovery see rez-config-plugins; for a resolve that fails on any
platform see rez-resolve-troubleshooting.
Platform note. Every fenced block in this skill is tagged with the shell it belongs to (
powershell,bat, ```bash). Commands taggedpowershellorbatare Windows-only and will fail on Linux or macOS, where those shells are not registered. Therez-interpretexamples are safe to run anywhere — it only prints text, never launches a shell.
Which shells exist on Windows
Rez ships shell plugins for bash, sh, csh, tcsh, zsh, cmd, gitbash, powershell and pwsh, but only the ones valid for the current platform are registered. On Windows:
cmd, gitbash, powershell, pwsh
The POSIX shells are not registered there, so rez-env --shell bash is not a valid value on
Windows and vice versa. Ask rez rather than assuming, because the answer is platform-dependent:
from rez.shells import get_shell_types
print(get_shell_types()) # ['cmd', 'gitbash', 'powershell', 'pwsh'] on Windows
How the default shell is chosen
The order is default_shell, then system.shell:
rez-config default_shell
default_shell is empty ('') out of the box, in which case rez falls back to detecting the current
shell — on Windows that is typically powershell. There is no default_windows_shell setting in
rez 3.4.0; default_shell is the only knob, and it applies on every platform.
To target a shell for one invocation:
# Windows only — 'cmd' is not a registered shell on Linux or macOS
rez-env foo --shell cmd
REM Windows only
rez-env foo --shell cmd
The path separator trap
This is the difference that breaks real packages. The same rex produces different text per shell:
rez-interpret -c 'env.MY_PATH.prepend("C:/pkgs/foo/bin")' -f cmd --pv MY_PATH
rez-interpret -c 'env.MY_PATH.prepend("C:/pkgs/foo/bin")' -f pwsh --pv MY_PATH
rez-interpret -c 'env.MY_PATH.prepend("C:/pkgs/foo/bin")' -f gitbash --pv MY_PATH
With MY_PATH already set, the generated code is:
| Shell | Generated line | Separator |
|---|---|---|
cmd |
set MY_PATH=C:\pkgs\foo\bin;C:\Program Files\Git\usr\bin;... |
; |
pwsh |
Set-Item -Path "Env:MY_PATH" -Value ("C:\pkgs\foo\bin;" + ...) |
; |
gitbash |
export MY_PATH="C:/pkgs/foo/bin:${MY_PATH}" |
: |
Two things to take from it:
- The list separator is
;undercmdandpwsh, and:undergitbash. Apackage.pythat builds a list by hand — joining with:because it was written on Linux — produces a single unreadable entry on Windows. Use the rex list operations (append,prepend,set) and let rez pick the separator. cmdandpwshemit backslashes;gitbashkeeps forward slashes. Both work in their own shell, so the difference only bites when you compare or string-match paths.
The separator applies to every list-valued variable, not just PATH — PYTHONPATH,
LD_LIBRARY_PATH-style variables and any custom list behave the same way.
Backslashes, drive letters and path separators
os.sepis a backslash andos.pathsepis a semicolon on Windows, versus a forward slash and a colon on POSIX.packages_pathis a Python list, so it is immune to the separator problem — do not build a;-joined string for it.- Flags that do take a joined path list use
os.pathsep, so they take;on Windows. This includesrez-env --pathsandrez-search --paths:
# Windows only — the separator is ';' here, not ':'
rez-env --paths "C:/studio/packages;C:/studio/local" foo -o context.rxt
- Paths inside a
package.pyshould be written with forward slashes or with{root}, and joined with the rex API. A hard-coded backslash will not survive a move to Linux, and a hard-coded colon will not survive a move to Windows.
Path length: the 260-character limit
Win32 caps a path at 260 characters (MAX_PATH) unless long paths are enabled. Rez paths are
deep by construction, so this is a real failure mode and not a theoretical one.
The depth comes from how a variant is laid out. For the filesystem repository the install path is
<repo>/<name>/<version>/<variant subpath>/, and the variant subpath nests one directory per
variant requirement. A package with
variants = "python-3.11", "pytest-7", "six" installs under:
Установить rez-windows-platform в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл rez-windows-platform?
Running rez on Windows — why only cmd, gitbash, powershell and pwsh are registered there and how the default is picked, the path-separator trap where cmd and pwsh join with ';' while gitbash joins with ':', backslash versus forward slash in generated shell code, the 260-character MAX_PATH limit and why variant install paths exceed it, the platform/arch/os implicit packages, using rez-interpret as a cross-shell oracle without launching a shell, install and config-file layout, and CI differences. Use when a package or resolve behaves differently on Windows, when porting a package across operating systems, when a deep path fails to read or write, or when a one-liner works in bash and fails in cmd. Covers Rez 3.4.0.
Как установить скилл rez-windows-platform?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rez-windows-platform запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic