forked from google/dart_cli_script
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
Absolute glob expansion fails on Windows in two places:
test/ls_test.dart:ls() an absolute glob expands to absolute pathstest/cli_arguments_test.dart:globbing with glob: true an absolute glob expands to absolute paths
In CI, expected expanded files are not returned; the pattern is treated as a literal *.txt path.
Reproduction
- Run: https://github.com/open-runtime/dart_cli_script/actions/runs/22376939954
- windows-x64 job: https://github.com/open-runtime/dart_cli_script/actions/runs/22376939954/job/64769258023
- windows-arm64 job: https://github.com/open-runtime/dart_cli_script/actions/runs/22376939954/job/64769258042
Suspected root cause
Glob patterns are being constructed/handled with Windows path separators (\\) instead of POSIX-style separators (/) expected by the glob package parser.
Expected behavior
When glob: true, absolute patterns on Windows should expand to matching absolute file paths, same as Linux/macOS semantics.
Proposed approach
- Normalize glob pattern input to POSIX-style separators before constructing
Glob(...). - Ensure
ls()andCliArgumentsfollow the same normalization strategy. - Add explicit Windows tests for:
- absolute glob expansion
- Windows-style backslash input normalization
Acceptance criteria
- Both failing absolute-glob tests pass on
windows-x64andwindows-arm64 - Existing Linux/macOS glob tests remain green
- No regressions in non-glob argument parsing
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working