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 ( import (
"errors" "errors"
"fmt" "fmt"
"os"
"time"
"github.com/fatih/color" "github.com/fatih/color"
"github.com/tockins/interact" "github.com/tockins/interact"
"github.com/tockins/realize/server" "github.com/tockins/realize/server"
@ -13,7 +10,9 @@ import (
"github.com/tockins/realize/style" "github.com/tockins/realize/style"
"github.com/tockins/realize/watcher" "github.com/tockins/realize/watcher"
cli "gopkg.in/urfave/cli.v2" cli "gopkg.in/urfave/cli.v2"
"os"
"strconv" "strconv"
"time"
) )
const ( const (
@ -1033,7 +1032,7 @@ func main() {
if err := r.Record(r); err != nil { if err := r.Record(r); err != nil {
return err return err
} }
fmt.Fprintln(style.Output, prefix(style.Green.Bold("Your configuration was successful."))) fmt.Fprintln(style.Output, prefix(style.Green.Bold(" Your configuration was successful.")))
return nil return nil
}, },
Before: before, Before: before,
@ -1147,6 +1146,9 @@ func polling(c *cli.Context, s *settings.Legacy) {
// Insert a project if there isn't already one // Insert a project if there isn't already one
func insert(c *cli.Context, b *watcher.Blueprint) error { 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 len(b.Projects) <= 0 {
if err := b.Add(c); err != nil { if err := b.Add(c); err != nil {
return err return err