mirror of
https://github.com/go-task/task.git
synced 2025-01-22 05:10:17 +02:00
Changed minor code style
This commit is contained in:
parent
3779f72155
commit
1576943702
6
task.go
6
task.go
@ -40,7 +40,7 @@ type Task struct {
|
|||||||
Deps []string
|
Deps []string
|
||||||
Sources []string
|
Sources []string
|
||||||
Generates []string
|
Generates []string
|
||||||
Chdir string
|
Dir string
|
||||||
}
|
}
|
||||||
|
|
||||||
type taskNotFoundError struct {
|
type taskNotFoundError struct {
|
||||||
@ -101,7 +101,7 @@ func RunTask(name string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, c := range t.Cmds {
|
for _, c := range t.Cmds {
|
||||||
if err := runCommand(c, t.Chdir); err != nil {
|
if err := runCommand(c, t.Dir); err != nil {
|
||||||
return &taskRunError{name, err}
|
return &taskRunError{name, err}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -133,7 +133,7 @@ func runCommand(c, path string) error {
|
|||||||
} else {
|
} else {
|
||||||
cmd = exec.Command("cmd", "/C", c)
|
cmd = exec.Command("cmd", "/C", c)
|
||||||
}
|
}
|
||||||
if "" != path {
|
if path != "" {
|
||||||
cmd.Dir = path
|
cmd.Dir = path
|
||||||
}
|
}
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
|
Loading…
x
Reference in New Issue
Block a user