File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ trait ManagesProcess
39
39
40
40
protected $ children = [];
41
41
42
+ protected $ environment = [];
43
+
42
44
public function createPendingProcess (): PendingProcess
43
45
{
44
46
$ this ->input ??= new InputStream ;
@@ -83,6 +85,7 @@ public function createPendingProcess(): PendingProcess
83
85
'FORCE_COLOR ' => '1 ' ,
84
86
'COLUMNS ' => $ this ->scrollPaneWidth (),
85
87
'LINES ' => $ this ->scrollPaneHeight (),
88
+ ...$ this ->environment ,
86
89
...$ process ->environment
87
90
]);
88
91
}
@@ -127,6 +130,13 @@ public function withProcess(Closure $cb)
127
130
return $ this ;
128
131
}
129
132
133
+ public function withEnv (array $ env )
134
+ {
135
+ $ this ->environment = $ env ;
136
+
137
+ return $ this ;
138
+ }
139
+
130
140
public function autostart (): static
131
141
{
132
142
if ($ this ->autostart && $ this ->processStopped ()) {
You can’t perform that action at this time.
0 commit comments