Skip to content

Commit

Permalink
atlasexec: use value receiver to keep original atlas client
Browse files Browse the repository at this point in the history
  • Loading branch information
luantranminh committed Jun 17, 2024
1 parent 321ed4f commit e8fc70d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions atlasexec/atlas.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ func NewClient(workingDir, execPath string) (_ *Client, err error) {
// })
// return err
// })
func (c *Client) WithWorkDir(dir string, fn func(*Client) error) error {
func (c Client) WithWorkDir(dir string, fn func(*Client) error) error {
c.workingDir = dir
return fn(c)
return fn(&c)
}

// Login runs the 'login' command.
Expand Down

0 comments on commit e8fc70d

Please sign in to comment.