MCPcopy
hub / github.com/go-task/task / printTaskCommands

Function printTaskCommands

internal/summary/summary.go:109–130  ·  view source on GitHub ↗
(l *logger.Logger, t *ast.Task)

Source from the content-addressed store, hash-verified

107}
108
109func 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
132func printTaskVars(l *logger.Logger, t *ast.Task) {
133 if t.Vars == nil || t.Vars.Len() == 0 {

Callers 1

PrintTaskFunction · 0.85

Calls 1

OutfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…