Skip to content

Commit 1361c13

Browse files
authored
feat: inject USER into shells (#1818)
1 parent 951dc2d commit 1361c13

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

agent/agent.go

+1
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ func (a *agent) createCommand(ctx context.Context, rawCommand string, env []stri
359359
if err != nil {
360360
return nil, xerrors.Errorf("getting os executable: %w", err)
361361
}
362+
cmd.Env = append(cmd.Env, fmt.Sprintf("USER=%s", username))
362363
cmd.Env = append(cmd.Env, fmt.Sprintf(`PATH=%s%c%s`, os.Getenv("PATH"), filepath.ListSeparator, filepath.Dir(executablePath)))
363364
// Git on Windows resolves with UNIX-style paths.
364365
// If using backslashes, it's unable to find the executable.

0 commit comments

Comments
 (0)