This commit is contained in:
alessio 2017-09-18 03:05:00 +02:00
parent bf55c51676
commit fb1ebdfe4f
1 changed files with 6 additions and 4 deletions

View File

@ -3,9 +3,6 @@ package main
import (
"errors"
"fmt"
"os"
"time"
"github.com/fatih/color"
"github.com/tockins/interact"
"github.com/tockins/realize/server"
@ -13,7 +10,9 @@ import (
"github.com/tockins/realize/style"
"github.com/tockins/realize/watcher"
cli "gopkg.in/urfave/cli.v2"
"os"
"strconv"
"time"
)
const (
@ -1147,6 +1146,9 @@ func polling(c *cli.Context, s *settings.Legacy) {
// Insert a project if there isn't already one
func insert(c *cli.Context, b *watcher.Blueprint) error {
if c.Bool("no-config") {
r.Blueprint.Projects = []watcher.Project{}
}
if len(b.Projects) <= 0 {
if err := b.Add(c); err != nil {
return err