(command string, message string)
| 470 | } |
| 471 | |
| 472 | func injectCommandWithMessage(command string, message string) string { |
| 473 | placeHolders := strings.Count(command, "%s") |
| 474 | if placeHolders > 1 { |
| 475 | say.Error(fmt.Sprintf("Too many placeholders (%d) in format command string: %s", placeHolders, command)) |
| 476 | Exit(1) |
| 477 | } |
| 478 | if placeHolders == 0 { |
| 479 | return fmt.Sprintf("%s %s", command, message) |
| 480 | } |
| 481 | return fmt.Sprintf(command, message) |
| 482 | } |
| 483 | |
| 484 | func executeCommandsInBackgroundProcess(commands ...string) (err error) { |
| 485 | cmds := make([]string, 0) |
no test coverage detected