from vscode
This commit is contained in:
@@ -185,7 +185,7 @@ func PureResultSingleExecuteBatch(singleCommandList [][]string) (resultOK bool)
|
||||
}
|
||||
|
||||
// ReadTimeCommandExecutor 执行命令,并且实时返回结果
|
||||
func ReadTimeCommandExecutor(singleLineCommand []string) {
|
||||
func ReadTimeCommandExecutor(singleLineCommand []string) bool {
|
||||
cmd := exec.Command(singleLineCommand[0], singleLineCommand[1:]...)
|
||||
stdout, err := cmd.StdoutPipe()
|
||||
if err != nil {
|
||||
@@ -205,8 +205,10 @@ func ReadTimeCommandExecutor(singleLineCommand []string) {
|
||||
|
||||
if err := cmd.Wait(); err != nil {
|
||||
log.ErrorF("command %v result error => %v", singleLineCommand, err)
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func realTimeOutput(r io.Reader) {
|
||||
|
||||
Reference in New Issue
Block a user