refactor: remove stdins from the command logs

This commit is contained in:
Saw-jan
2024-07-09 11:48:03 +05:45
parent 78ca9bacf9
commit 13b428ecae
5 changed files with 23 additions and 21 deletions
+3
View File
@@ -266,5 +266,8 @@ func RunCommand(command string, inputs []string) (int, string) {
io.Copy(logs, ptyF)
cmdOutput += logs.String()
// TODO: find if there is a better way to remove stdins from the output
cmdOutput = strings.TrimLeft(cmdOutput, strings.Join(inputs, "\r\n"))
return c.ProcessState.ExitCode(), cmdOutput
}