Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sascha-andres
Copy link
Contributor

I wanted to run tools in sub directories of the directory Taskfile.yml lives in. For me it is more convenient to provide a directory to run the command(s) in then prefixing each command with cd <path> &&

@sascha-andres
Copy link
Contributor Author

A sample file looks like this:

build:
  cmds:
    - ./run.sh
  chdir: ./build/

task.go Outdated
Deps []string
Sources []string
Generates []string
Chdir string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be called just "dir".

task.go Outdated
} else {
cmd = exec.Command("cmd", "/C", c)
}
if "" != path {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path != ""

@sascha-andres
Copy link
Contributor Author

Updated code

@andreynering andreynering merged commit 847f206 into go-task:master Mar 1, 2017
@andreynering
Copy link
Member

Thank you very much

sascha-andres added a commit that referenced this pull request Mar 7, 2017
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.

3 participants