File tree 1 file changed +1
-19
lines changed
1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change @@ -434,26 +434,8 @@ func execHandle(bg bool) interp.ExecHandlerFunc {
434
434
// sh/interp but with our job handling
435
435
436
436
env := hc .Env
437
- envList := make ([] string , 0 , 64 )
437
+ envList := os . Environ ( )
438
438
env .Each (func (name string , vr expand.Variable ) bool {
439
- if name == "PATH" {
440
- pathEnv := os .Getenv ("PATH" )
441
- envList = append (envList , "PATH=" + pathEnv )
442
- return true
443
- }
444
-
445
- if ! vr .IsSet () {
446
- // If a variable is set globally but unset in the
447
- // runner, we need to ensure it's not part of the final
448
- // list. Seems like zeroing the element is enough.
449
- // This is a linear search, but this scenario should be
450
- // rare, and the number of variables shouldn't be large.
451
- for i , kv := range envList {
452
- if strings .HasPrefix (kv , name + "=" ) {
453
- envList [i ] = ""
454
- }
455
- }
456
- }
457
439
if vr .Exported && vr .Kind == expand .String {
458
440
envList = append (envList , name + "=" + vr .String ())
459
441
}
You can’t perform that action at this time.
0 commit comments