Commit 5237225
fix(cli): accept bare repo-name in openenv push --repo-id (#651)
* fix(cli): accept bare repo-name in openenv push --repo-id
When the user is already authenticated, the CLI knows their username,
so a bare name like `my-env` should expand to `username/my-env` rather
than failing with a format error.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test: remove misleading mock_stage.return_value
_prepare_staging_directory is called for side-effects; staging_dir is
assigned before the call, so the mock return value has no effect.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(cli): update --repo-id help text and rename unused mock
- Document bare repo-name expansion in the --repo-id help string
- Rename mock_stage to _mock_stage (unused variable convention)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(cli): validate repo_id with count>1, expand bare names for correct URL output
Reject repo-ids with more than one slash (mirroring hf_hub's validate_repo_id),
and expand bare names using the authenticated username so the printed Space URL
is correct end-to-end.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent fbbde4e commit 5237225
2 files changed
Lines changed: 40 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
543 | | - | |
| 543 | + | |
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
| |||
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
821 | | - | |
822 | | - | |
| 821 | + | |
823 | 822 | | |
824 | | - | |
| 823 | + | |
825 | 824 | | |
| 825 | + | |
| 826 | + | |
826 | 827 | | |
827 | 828 | | |
828 | 829 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
| 516 | + | |
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
| 525 | + | |
| 526 | + | |
529 | 527 | | |
530 | 528 | | |
531 | 529 | | |
532 | 530 | | |
533 | | - | |
534 | | - | |
| 531 | + | |
535 | 532 | | |
536 | 533 | | |
537 | 534 | | |
538 | 535 | | |
539 | 536 | | |
540 | 537 | | |
541 | 538 | | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
542 | 570 | | |
543 | 571 | | |
544 | 572 | | |
| |||
0 commit comments