Skip to content

Commit

Permalink
Add ClientRawOptions.Dir
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Aug 14, 2022
1 parent d46c3aa commit 6d259c8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ func StartClientRaw(opts ClientRawOptions) (*ClientRaw, error) {
}
cmd.Env = env

cmd.Dir = opts.Dir

conn, err := newConn(cmd, opts.Timeout)
if err != nil {
return nil, err
Expand Down Expand Up @@ -280,6 +282,11 @@ type ClientRawOptions struct {
// A slice of strings of the form "key=value"
Env []string

// Dir specifies the working directory of the command.
// If Dir is the empty string, the command runs in the
// calling process's current directory.
Dir string

// Callback for messages received from server without an ID (e.g. log message).
OnMessage func(Message)

Expand Down

0 comments on commit 6d259c8

Please sign in to comment.