Skip to content

Commit de279c4

Browse files
committed
CLI: Fix Windows path handling.
1 parent 352dad4 commit de279c4

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎changelog.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
## 1.1.1 (WIP)
1111

12+
- `[f]` Preserve Windows drive-letter paths when parsing CLI targets instead of truncating them at the drive colon.
1213
- `[+]` Expose `LINT_ROOT` to the GitHub Action's setup command and default to `nimble setup --requires:"file://$LINT_ROOT" -y`, resolving the exact action checkout alongside project dependencies without a duplicate version pin or global project installation.
1314
- `[+]` Add `--verbose` / `-v` for real-time per-file analysis and checking progress. Semantic progress is now opt-in; warnings and errors remain visible by default.
1415

‎src/lint/private/cli.nim‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ proc parseTarget*(arg: string): Target =
112112
path = arg[0 ..< colonPosition]
113113
ranges = parseRanges(arg[colonPosition + 1 .. ^1])
114114

115-
Target(path: path, lines: ranges)
115+
if len(ranges) == 0:
116+
Target(path: arg)
117+
else:
118+
Target(path: path, lines: ranges)
116119

117120
proc parseOptions*(args: seq[string]): Options =
118121
## Parses the command line. Accepts `--format=github` and `--format:github`.

0 commit comments

Comments
 (0)