Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade version of command #387

Open
elisarver opened this issue Sep 23, 2021 · 0 comments
Open

upgrade version of command #387

elisarver opened this issue Sep 23, 2021 · 0 comments

Comments

@elisarver
Copy link
Collaborator

[email protected] is now out, update tests to use it.

Previously the command.New accepted functional options, but the exec.Cmd rework of the package has made this more go-stdlib-like.

before:

ctx := context.TODO()
cmd := command.New(command.WithDir("somewhere"))
output, err := cmd.Run(ctx, "echo", "hello world")

after:

cmd := command.New("echo", "hello world")
cmd.Dir = "somewhere"
output, err := cmd.CombinedOutput()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant