Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1361c13

Browse files
authored
feat: inject USER into shells (#1818)
1 parent951dc2d commit1361c13

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎agent/agent.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ func (a *agent) createCommand(ctx context.Context, rawCommand string, env []stri
359359
iferr!=nil {
360360
returnnil,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)

[8]ページ先頭

©2009-2025 Movatter.jp