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 https://github.com/magefile/mage/issues/213
Added
sh.Command
struct to mirrorexec.Cmd
and allow configuringsh.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 tosh.Command
as fields, and mimicked current behavior.Moved
sh.run
functionality tosh.(*Command).run
, and updatedsh.Exec
to usesh.Command.Exec
.Added
WorkingDir
field to change the command's working directory.