Commit Graph
2 Commits
Author SHA1 Message Date
Jesse Hills 7b2e2850f2 Make the setup tests pass on Windows
The tests assumed a POSIX host, but pytest also runs on windows-latest.
Both path flavours are now built with PurePosixPath and PureWindowsPath,
which work on either host, the bin/Scripts layout is asserted against the
host, and the executable bit is only checked where it exists.

Also drops the trailing separator from PATH when PATH is unset, since an
empty entry makes Unix search the working directory for executables.
2026-09-01 08:58:51 +12:00
Jesse Hills f8ea4873b6 [core] Consolidate setup scripts into a cross-platform setup.py
script/setup and script/setup.bat implemented the same workflow and were
kept in sync by hand, which had already drifted: the worktree hook fix in
#18843 landed in the bash script only. Both are now thin wrappers around
script/setup.py, so there is one implementation to maintain.

The post-checkout hook also checks for a venv/Scripts layout before doing
anything, so a branch switch on Windows can no longer clear a working
virtual environment.
2026-08-28 20:00:49 +12:00