diff --git a/app/watch/start.go b/app/watch/start.go index a80415d..1170000 100644 --- a/app/watch/start.go +++ b/app/watch/start.go @@ -46,6 +46,7 @@ func StartCmd(watchCmd *cobra.Command) (app *cobra.Command) { run(cmd) }, } + util.SetLimit(999999) watchCmd.AddCommand(app) return } diff --git a/app/watch/task.go b/app/watch/task.go index b0b7040..810192f 100644 --- a/app/watch/task.go +++ b/app/watch/task.go @@ -196,6 +196,7 @@ func (t *taskType) run(cf *changedFile, commands []string, outpuContent bool, ex } if err = cmd.Wait(); err != nil { errMsg := err.Error() + if !strings.Contains(errMsg, "exit status 1") && !strings.Contains(errMsg, "signal: killed") { util.Log.Println("command End:", err) } diff --git a/app/watch/util_no_win.go b/app/watch/util_no_win.go index 9bbe85a..d494299 100644 --- a/app/watch/util_no_win.go +++ b/app/watch/util_no_win.go @@ -2,7 +2,9 @@ package watch -import "os" +import ( + "os" +) func sameFile(fi1, fi2 os.FileInfo) bool { return os.SameFile(fi1, fi2) diff --git a/cmd/stress.go b/cmd/stress.go index dbeb1ec..24e1c21 100644 --- a/cmd/stress.go +++ b/cmd/stress.go @@ -15,6 +15,7 @@ import ( v "github.com/spf13/viper" "github.com/sohaha/zzz/app/stress" + "github.com/sohaha/zzz/util" ) var stressUse = "stress" @@ -152,6 +153,7 @@ var stressCmd = &cobra.Command{ } } + util.SetLimit(999999) targetRequestStats, err := stress.RunStress(stressCfg, os.Stdout) if err != nil { return err diff --git a/cmd/watch.go b/cmd/watch.go index 9544beb..e770d3f 100644 --- a/cmd/watch.go +++ b/cmd/watch.go @@ -5,9 +5,10 @@ import ( "time" "github.com/sohaha/zlsgo/zfile" + "github.com/spf13/cobra" + "github.com/sohaha/zzz/app/watch" "github.com/sohaha/zzz/util" - "github.com/spf13/cobra" ) var ( diff --git a/main.go b/main.go index 532387b..c4b2dfd 100644 --- a/main.go +++ b/main.go @@ -8,7 +8,5 @@ func main() { var c = make(chan struct{}, 0) go cmd.GetNewVersion(c) cmd.Execute() - select { - case <-c: - } + <-c } diff --git a/util/util.go b/util/util.go index 4ec051e..97facf1 100644 --- a/util/util.go +++ b/util/util.go @@ -25,7 +25,7 @@ var ( once sync.Once installPath string homePath string - Version = "1.0.25" + Version = "1.0.26" BuildTime = "" BuildGoVersion = "" )