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