Skip to content

Commit 2fa0e2d

Browse files
committed
fix path list separator on windows
1 parent d18422e commit 2fa0e2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

agent/agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ func (a *agent) createCommand(ctx context.Context, rawCommand string, env []stri
363363
// If using backslashes, it's unable to find the executable.
364364
executablePath = strings.ReplaceAll(executablePath, "\\", "/")
365365
cmd.Env = append(cmd.Env, fmt.Sprintf(`GIT_SSH_COMMAND=%s gitssh --`, executablePath))
366-
cmd.Env = append(cmd.Env, fmt.Sprintf(`PATH=%s:%s`, os.Getenv("PATH"), executablePath))
366+
cmd.Env = append(cmd.Env, fmt.Sprintf(`PATH=%s%s%s`, os.Getenv("PATH"), os.PathListSeparator, executablePath))
367367
// These prevent the user from having to specify _anything_ to successfully commit.
368368
// Both author and committer must be set!
369369
cmd.Env = append(cmd.Env, fmt.Sprintf(`GIT_AUTHOR_EMAIL=%s`, metadata.OwnerEmail))

0 commit comments

Comments
 (0)