Problem
dispatcherPinCandidatePaths in cli/dispatcher/internal/dispatcher/dispatcher_pin.go uses filepath.Glob for PackageCache pin discovery. If the Unity project path contains glob metacharacters such as [ or ], the project-root portion is interpreted as a pattern and valid pin candidates can be missed.
The V2 package detector no longer has this issue because it uses os.ReadDir, but the existing V3 project-runner pin path still does.
Reproduction
- Create or move a pinned V3 Unity project under a path such as
<PROJECT_ROOT>/project[legacy].
- Ensure the package pin is available through
Library/PackageCache/<PACKAGE_NAME>@*/project-runner-pin.json and no higher-priority copied pin is present.
- Run a project-scoped
uloop command.
- Observe that pin resolution can report the pin as missing.
Expected
PackageCache discovery treats every project-root character literally and finds the pin regardless of glob metacharacters.
Suggested direction
Replace the glob-based directory discovery with literal os.ReadDir traversal, matching the V2 detector approach, and add regression coverage for bracketed project paths and Windows separators.
Problem
dispatcherPinCandidatePathsincli/dispatcher/internal/dispatcher/dispatcher_pin.gousesfilepath.Globfor PackageCache pin discovery. If the Unity project path contains glob metacharacters such as[or], the project-root portion is interpreted as a pattern and valid pin candidates can be missed.The V2 package detector no longer has this issue because it uses
os.ReadDir, but the existing V3 project-runner pin path still does.Reproduction
<PROJECT_ROOT>/project[legacy].Library/PackageCache/<PACKAGE_NAME>@*/project-runner-pin.jsonand no higher-priority copied pin is present.uloopcommand.Expected
PackageCache discovery treats every project-root character literally and finds the pin regardless of glob metacharacters.
Suggested direction
Replace the glob-based directory discovery with literal
os.ReadDirtraversal, matching the V2 detector approach, and add regression coverage for bracketed project paths and Windows separators.