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

Added working directory and context support. #444

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hamzaelsaawy
Copy link

This PR is an attempt to solve #213

Added sh.Command struct to mirror exec.Cmd and allow configuring
sh.Exec options, instead of adding a new function that
can change the working directory.

A single configuration struct was chosen instead of options since
the struct aggregates all configuration options together.

Added current sh.Exec parameters to sh.Command as fields, and
mimicked current behavior.

Moved sh.run functionality to sh.(*Command).run, and updated
sh.Exec to use sh.Command.Exec.

Added WorkingDir field to change the command's working
directory.

This PR is an attempt to solve magefile#213

Added `sh.Command` struct to mirror `exec.Cmd` and allow configuring
`sh.Exec` options, instead of adding a new function that
can change the working directory.

A single configuration struct was chosen instead of options since
the struct aggregates all configuration options together.

Added current `sh.Exec` parameters to `sh.Command` as fields, and
mimicked current behavior.

Moved `sh.run` functionality to `sh.(*Command).run`, and updated
`sh.Exec` to use `sh.Command.Exec`.

Added `WorkingDir` field to change the command's working
directory.

Signed-off-by: Hamza El-Saawy <hamza.elsaawy@gmail.com>
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

Successfully merging this pull request may close these issues.

None yet

1 participant