sys - add RunSilentCmd & rename RunBufferedCmd

This commit is contained in:
Mahdi Abu Yasmine 2023-11-07 00:36:16 +01:00
parent dd6475ed85
commit e2fc91ffba

View File

@ -14,7 +14,12 @@ import (
var TERM_WIDTH = 0 var TERM_WIDTH = 0
func RunCmdBuffered(cmd *exec.Cmd, out *bytes.Buffer) int { func RunSilentCmd(cmd *exec.Cmd) int {
_, err := cmd.CombinedOutput()
return ManageStatusCmd(cmd, err)
}
func RunBufferedCmd(cmd *exec.Cmd, out *bytes.Buffer) int {
rs1, err := cmd.CombinedOutput() rs1, err := cmd.CombinedOutput()
if err != nil { if err != nil {
fmt.Println("Error: ", err) fmt.Println("Error: ", err)