Commit 17c81cb
fix(cli): download shorthand now correctly handles project/version format
Replace _parse_url regex with resolve_resource() for non-URL shorthands.
The regex couldn't disambiguate "project/version" from "workspace/project"
when the second segment was numeric. Now uses the same resolver as all
other commands, which checks if the last segment is numeric (version).
Before: roboflow download test-detection/1 → workspace=test-detection, project=1 (WRONG)
After: roboflow download test-detection/1 → workspace=default, project=test-detection, version=1 (CORRECT)
Full URLs (https://universe.roboflow.com/...) still use the URL regex.
All 4 download forms verified against staging:
- project/version (shorthand)
- project (picks latest)
- workspace/project/version (full path)
- Full URL
405 tests pass, all linting clean.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 246e6a6 commit 17c81cb
1 file changed
Lines changed: 21 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
171 | 175 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
177 | 186 | | |
178 | 187 | | |
179 | 188 | | |
| |||
0 commit comments