优化 代码
This commit is contained in:
parent
92af817777
commit
27f934d6fb
@ -17,7 +17,7 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
projectFolder string = "."
|
||||
projectFolder = "."
|
||||
|
||||
cfg *FileGirl
|
||||
|
||||
|
@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
@ -60,7 +61,7 @@ func (t *TaskMan) run(cf *changedFile) {
|
||||
defer t.runLock.Unlock()
|
||||
for i := 0; i < len(cfg.Command.Exec); i++ {
|
||||
carr := cmdParse2Array(cfg.Command.Exec[i], cf)
|
||||
log.Println(carr)
|
||||
log.Println("EXEC", carr)
|
||||
t.cmd = exec.Command(carr[0], carr[1:]...)
|
||||
//cmd.SysProcAttr = &syscall.SysProcAttr{CreationFlags: syscall.CREATE_UNICODE_ENVIRONMENT}
|
||||
t.cmd.Stdin = os.Stdin
|
||||
@ -80,7 +81,7 @@ func (t *TaskMan) run(cf *changedFile) {
|
||||
if err2 != nil || io.EOF == err2 {
|
||||
break
|
||||
}
|
||||
log.Print(line)
|
||||
fmt.Print(line)
|
||||
}
|
||||
err = t.cmd.Wait()
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user