Skip to content

Commit

Permalink
clarify comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 committed Jul 2, 2024
1 parent ead052f commit 47ae457
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ var runCommandToStreamTaskLogs = []string{shellWrapperCommand, "-c", fmt.Sprintf

// Wraps [commandToRun] to enable streaming logs from tasks.
// Uses curly braces to execute the command(s) in the current shell.
// Adds an extra echo to ensure each log ends with a newline (may add an extra line at the end).
// Uses tee to direct output to the task log file
// Redirects stderr to stdout (can be disabled if not needed).
// Adds an extra echo to ensure each log ends with a newline.
// Uses tee to direct output to the task log file while maintaining output to stdout.
// Redirects stderr to stdout.
func getCommandToRunForStreamingLogs(commandToRun string) []string {
return []string{shellWrapperCommand, "-c", fmt.Sprintf("{ %v; } %v %v %v %v %v %v %v %v", commandToRun, "2>&1", "|", "tee", taskLogFilePath, "&&", "echo", ">>", taskLogFilePath)}
}
Expand Down

0 comments on commit 47ae457

Please sign in to comment.