Skip to content

Commit 6d259c8

Browse files
committed
Add ClientRawOptions.Dir
1 parent d46c3aa commit 6d259c8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎client.go‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ func StartClientRaw(opts ClientRawOptions) (*ClientRaw, error) {
8585
}
8686
cmd.Env = env
8787

88+
cmd.Dir = opts.Dir
89+
8890
conn, err := newConn(cmd, opts.Timeout)
8991
if err != nil {
9092
return nil, err
@@ -280,6 +282,11 @@ type ClientRawOptions struct {
280282
// A slice of strings of the form "key=value"
281283
Env []string
282284

285+
// Dir specifies the working directory of the command.
286+
// If Dir is the empty string, the command runs in the
287+
// calling process's current directory.
288+
Dir string
289+
283290
// Callback for messages received from server without an ID (e.g. log message).
284291
OnMessage func(Message)
285292

0 commit comments

Comments
 (0)