mirror of
https://github.com/go-task/task.git
synced 2025-01-26 05:27:15 +02:00
refactoring
This commit is contained in:
parent
f66edbad50
commit
8eadfc1bf6
@ -81,17 +81,19 @@ func printTaskDependencies(l *logger.Logger, t *taskfile.Task) {
|
||||
}
|
||||
|
||||
func printTaskCommands(l *logger.Logger, t *taskfile.Task) {
|
||||
hasCommands := len(t.Cmds) > 0
|
||||
if hasCommands {
|
||||
l.Outf("")
|
||||
l.Outf("commands:")
|
||||
for _, c := range t.Cmds {
|
||||
isCommand := c.Cmd != ""
|
||||
if isCommand {
|
||||
l.Outf(" - %s", c.Cmd)
|
||||
} else {
|
||||
l.Outf(" - Task: %s", c.Task)
|
||||
}
|
||||
noCommands := len(t.Cmds) == 0
|
||||
if noCommands {
|
||||
return
|
||||
}
|
||||
|
||||
l.Outf("")
|
||||
l.Outf("commands:")
|
||||
for _, c := range t.Cmds {
|
||||
isCommand := c.Cmd != ""
|
||||
if isCommand {
|
||||
l.Outf(" - %s", c.Cmd)
|
||||
} else {
|
||||
l.Outf(" - Task: %s", c.Task)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user