File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change 1
- exec devbox init
1
+ # Tests related to setting the environment for devbox run.
2
2
3
3
# Random vars should not leak into the run environment
4
4
env FOO=bar
@@ -24,4 +24,24 @@ env DEVBOX_FOO=baz
24
24
exec devbox run echo '$DEVBOX_FOO'
25
25
stdout 'baz'
26
26
27
- # TODO: test order/overwriting of variables
27
+ # Vars defined in devbox.json are passed through
28
+ env DEVBOX_FEATURE_ENV_CONFIG=1
29
+ exec devbox run echo '$CONFIG_VAR1'
30
+ stdout 'abc'
31
+
32
+ # Vars defined in devbox.json that reference another variable are set
33
+ env DEVBOX_FEATURE_ENV_CONFIG=1
34
+ env DEVBOX_FOO=baz
35
+ exec devbox run echo '$CONFIG_VAR2'
36
+ stdout 'baz'
37
+
38
+ # TODO: test order/overwriting of variables
39
+
40
+ -- devbox.json --
41
+ {
42
+ "packages": [],
43
+ "env": {
44
+ "CONFIG_VAR1": "abc",
45
+ "CONFIG_VAR2": "$DEVBOX_FOO"
46
+ }
47
+ }
You can’t perform that action at this time.
0 commit comments