Skip to content

Commit d18422e

Browse files
committed
fix: add coder executable to PATH
1 parent c78f947 commit d18422e

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
@@ -363,6 +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))
366367
// These prevent the user from having to specify _anything_ to successfully commit.
367368
// Both author and committer must be set!
368369
cmd.Env = append(cmd.Env, fmt.Sprintf(`GIT_AUTHOR_EMAIL=%s`, metadata.OwnerEmail))

0 commit comments

Comments
 (0)