File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ func main() {
6666 select {
6767 case event := <- fswatch .Events :
6868 // only care about events which may modify the contents of the directory
69- if ! ( event .Has (fsnotify .Write ) || event .Has (fsnotify .Remove ) || event .Has (fsnotify .Create ) ) {
69+ if ! event .Has (fsnotify .Write ) && ! event .Has (fsnotify .Remove ) && ! event .Has (fsnotify .Create ) {
7070 continue
7171 }
7272
Original file line number Diff line number Diff line change @@ -16,30 +16,30 @@ func Command(name string, arg ...string) *Cmd {
1616}
1717
1818func (a * Cmd ) AsyncRun () error {
19- if err := a .Cmd . Start (); err != nil {
19+ if err := a .Start (); err != nil {
2020 a .Error = err
2121 return a .Error
2222 }
23- if a .Cmd . Process == nil || a . Cmd .Process .Pid < 1 {
23+ if a .Process == nil || a .Process .Pid < 1 {
2424 a .Error = errors .New ("unable to create process" )
2525 return a .Error
2626 }
2727
2828 go func () {
29- a .Error = a .Cmd . Wait ()
29+ a .Error = a .Wait ()
3030 a .Terminated <- true
3131 }()
3232
3333 return nil
3434}
3535
3636func (a * Cmd ) Status () string {
37- if a .Cmd . Process == nil {
37+ if a .Process == nil {
3838 return "not started"
3939 }
4040
41- if a .Cmd . ProcessState != nil {
42- return a .Cmd . ProcessState .String ()
41+ if a .ProcessState != nil {
42+ return a .ProcessState .String ()
4343 }
4444
4545 if a .Error != nil {
You can’t perform that action at this time.
0 commit comments