Commit a474c16
authored
[devbox.json] Added env in config (#609)
## Summary
Added ability to add env variables in devbox.json
Current implementation only supports literal string values as well as
`$PATH` and `$PWD` variables.
## How was it tested?
1. Create a devbox.json similar to below:
```json
"env": {
"my_wd": "$PWD/test",
"my_path": "$PATH:my_stuff/bin",
"my_key": "string value"
}
```
2. Run `DEVBOX_FEATURE_NIXLESS_SHELL=1 DEVBOX_FEATURE_ENV_CONFIG=1
./devbox shell`
3. Inside devbox shell `echo $my_wd`, `echo $my_path` and `echo $my_key`
and confirm values are correctly setup.1 parent 5a97bb9 commit a474c16
File tree
6 files changed
+61
-10
lines changed- internal
- boxcli
- featureflag
- impl
6 files changed
+61
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
57 | 62 | | |
58 | 63 | | |
59 | 64 | | |
| |||
517 | 522 | | |
518 | 523 | | |
519 | 524 | | |
520 | | - | |
| 525 | + | |
521 | 526 | | |
522 | 527 | | |
523 | 528 | | |
524 | 529 | | |
525 | | - | |
526 | 530 | | |
527 | 531 | | |
528 | 532 | | |
| |||
535 | 539 | | |
536 | 540 | | |
537 | 541 | | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
543 | 546 | | |
544 | 547 | | |
545 | 548 | | |
546 | 549 | | |
547 | 550 | | |
548 | 551 | | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
549 | 558 | | |
550 | 559 | | |
551 | 560 | | |
| |||
747 | 756 | | |
748 | 757 | | |
749 | 758 | | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
750 | 766 | | |
751 | 767 | | |
752 | 768 | | |
| |||
881 | 897 | | |
882 | 898 | | |
883 | 899 | | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
884 | 929 | | |
885 | 930 | | |
886 | 931 | | |
| |||
0 commit comments