diff --git a/watcher/cmd.go b/watcher/cmd.go index 92b428f..eee0c06 100644 --- a/watcher/cmd.go +++ b/watcher/cmd.go @@ -44,9 +44,9 @@ func (h *Blueprint) Add(p *cli.Context) error { Name: h.name(p), Path: filepath.Clean(p.String("path")), Build: p.Bool("build"), - Bin: boolFlag(p.Bool("no-bin")), - Run: boolFlag(p.Bool("no-run")), - Fmt: boolFlag(p.Bool("no-fmt")), + Bin: !p.Bool("no-bin"), + Run: !p.Bool("no-run"), + Fmt: !p.Bool("no-fmt"), Test: p.Bool("test"), Params: argsParam(p), Watcher: Watcher{ diff --git a/watcher/utils.go b/watcher/utils.go index 4e8d98e..9c78fc6 100644 --- a/watcher/utils.go +++ b/watcher/utils.go @@ -20,14 +20,6 @@ func argsParam(params *cli.Context) []string { return nil } -// BoolParam is used to check the presence of a bool flag -func boolFlag(b bool) bool { - if b { - return false - } - return true -} - // Duplicates check projects with same name or same combinations of main/path func duplicates(value Project, arr []Project) (Project, error) { for _, val := range arr {