Repository navigation
Commit c49a3bf
committed
feat(cli): add --preserve-dir flag to sandbox upload for scp -r semantics
`openshell sandbox upload <local-dir> <remote-dir>` flattens the local
directory's contents into the remote destination by default — diverging
from the standard `scp -r` / `cp -r` semantics that operators expect.
This is a quiet footgun for anyone with prior file-transfer experience.
This change keeps the legacy default behavior (no breaking change) and
adds an opt-in `--preserve-dir` flag that wraps directory contents under
the source directory's basename in the destination, matching
`scp -r foo remote:/dest/` semantics.
Help text on the Upload command now calls out the divergence loudly so
operators discover the flag without a production incident first.
Closes NVIDIA#8851 parent e39bb38 commit c49a3bf
3 files changed
Lines changed: 82 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1298 | 1298 | | |
1299 | 1299 | | |
1300 | 1300 | | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
1301 | 1306 | | |
1302 | 1307 | | |
1303 | 1308 | | |
| |||
1314 | 1319 | | |
1315 | 1320 | | |
1316 | 1321 | | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
1317 | 1329 | | |
1318 | 1330 | | |
1319 | 1331 | | |
| |||
2320 | 2332 | | |
2321 | 2333 | | |
2322 | 2334 | | |
| 2335 | + | |
2323 | 2336 | | |
2324 | 2337 | | |
2325 | 2338 | | |
| |||
2348 | 2361 | | |
2349 | 2362 | | |
2350 | 2363 | | |
2351 | | - | |
| 2364 | + | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
2352 | 2373 | | |
2353 | 2374 | | |
2354 | 2375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2413 | 2413 | | |
2414 | 2414 | | |
2415 | 2415 | | |
| 2416 | + | |
2416 | 2417 | | |
2417 | 2418 | | |
2418 | 2419 | | |
| |||
2710 | 2711 | | |
2711 | 2712 | | |
2712 | 2713 | | |
2713 | | - | |
| 2714 | + | |
2714 | 2715 | | |
2715 | 2716 | | |
2716 | 2717 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
519 | | - | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
520 | 522 | | |
521 | 523 | | |
522 | 524 | | |
| |||
613 | 615 | | |
614 | 616 | | |
615 | 617 | | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
616 | 624 | | |
617 | 625 | | |
618 | 626 | | |
619 | 627 | | |
620 | 628 | | |
| 629 | + | |
621 | 630 | | |
622 | 631 | | |
623 | 632 | | |
| |||
653 | 662 | | |
654 | 663 | | |
655 | 664 | | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
656 | 670 | | |
657 | | - | |
| 671 | + | |
658 | 672 | | |
659 | 673 | | |
660 | 674 | | |
| |||
671 | 685 | | |
672 | 686 | | |
673 | 687 | | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
674 | 702 | | |
675 | 703 | | |
676 | 704 | | |
| |||
1265 | 1293 | | |
1266 | 1294 | | |
1267 | 1295 | | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
1268 | 1324 | | |
1269 | 1325 | | |
1270 | 1326 | | |
| |||
0 commit comments