Commit 8dc0001
Fix: allow vfox use --global without shell hook support (Docker compatibility)
When running in Docker RUN commands, `.bashrc` is not sourced by non-interactive
bash, so __VFOX_SHELL is never set and vfox use --global fails with the hook
error. Global scope only writes a config file and creates symlinks, so it does
not need shell hook support.
- In UseWithConfig: on non-Windows, only return the hook error when scope is
NOT global (mirrors the Windows behaviour)
- In useInHook: when hook env is absent and scope is global, skip spawning a
new shell and print a helpful hint instead
- Add TestUseWithConfig_NoHookEnv to verify session/project scopes still require
hook support while global scope does not
Co-authored-by: aooohan <40265686+aooohan@users.noreply.github.com>1 parent 5cd303e commit 8dc0001
3 files changed
+82
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
546 | | - | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
547 | 551 | | |
548 | 552 | | |
549 | 553 | | |
| |||
668 | 672 | | |
669 | 673 | | |
670 | 674 | | |
671 | | - | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
672 | 678 | | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
673 | 683 | | |
674 | 684 | | |
675 | 685 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 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 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
513 | 583 | | |
514 | 584 | | |
515 | 585 | | |
| |||
Binary file not shown.
0 commit comments