Skip to content

No working directory for sh.Exec #213

Description

@corebreaker

Hello,

os/exec.Command allow a working directory, but sometimes, we need it in sh.Exec too.

The easy way is to use the exec.Command function, but i don't like it.

I propose to pass a special variable in env parameter, like this:

Exec(map[string]string { "#CWD": "/home/theUser/mydir" }, nil, nil, "my-command")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions