in ibazel/output_runner/output_runner.go [75:101]
func (i *OutputRunner) AfterCommand(targets []string, command string, success bool, output *bytes.Buffer) {
if *runOutput == false || output == nil {
return
}
jsonCommandPath := ".bazel_fix_commands.json"
defaultRegex := Optcmd{
Regex: "^buildozer '(.*)'\\s+(.*)$",
Command: "buildozer",
Args: []string{"$1", "$2"},
}
optcmd := i.readConfigs(jsonCommandPath)
if optcmd == nil {
optcmd = []Optcmd{defaultRegex}
}
commandLines, commands, args := matchRegex(optcmd, output)
for idx, _ := range commandLines {
if *runOutputInteractive {
if i.promptCommand(commandLines[idx]) {
i.executeCommand(commands[idx], args[idx])
}
} else {
i.executeCommand(commands[idx], args[idx])
}
}
}