Skip to content

No working directory for sh.ExecΒ #213

Open
@corebreaker

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")

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