| 107 | } |
| 108 | |
| 109 | func printTaskCommands(l *logger.Logger, t *ast.Task) { |
| 110 | if len(t.Cmds) == 0 { |
| 111 | return |
| 112 | } |
| 113 | |
| 114 | l.Outf(logger.Default, "\n") |
| 115 | l.Outf(logger.Default, "commands:\n") |
| 116 | for _, c := range t.Cmds { |
| 117 | isCommand := c.Cmd != "" |
| 118 | l.Outf(logger.Default, " - ") |
| 119 | if isCommand { |
| 120 | // Use the masked command so secret values are not leaked in summaries |
| 121 | logCmd := c.LogCmd |
| 122 | if logCmd == "" { |
| 123 | logCmd = c.Cmd |
| 124 | } |
| 125 | l.Outf(logger.Yellow, "%s\n", logCmd) |
| 126 | } else { |
| 127 | l.Outf(logger.Green, "Task: %s\n", c.Task) |
| 128 | } |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | func printTaskVars(l *logger.Logger, t *ast.Task) { |
| 133 | if t.Vars == nil || t.Vars.Len() == 0 { |