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

Commits on Sep 18, 2022

  1. Added working directory and context support.

    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>
    hamzaelsaawy committed Sep 18, 2022
    Configuration menu
    Copy the full SHA
    9ac94fd View commit details
    Browse the repository at this point in the history