code review
This commit is contained in:
parent
bccfaca01d
commit
b7c50a2efb
10
realize.go
10
realize.go
|
@ -130,17 +130,17 @@ func main() {
|
|||
}
|
||||
}
|
||||
if p.Bool("legacy") {
|
||||
r.Config.Legacy = settings.Legacy{
|
||||
c.Config.Legacy = settings.Legacy{
|
||||
Status: p.Bool("legacy"),
|
||||
Interval: interval,
|
||||
}
|
||||
}
|
||||
if p.Bool("no-config") || len(r.Blueprint.Projects) <= 0 {
|
||||
if p.Bool("no-config") || len(c.Blueprint.Projects) <= 0 {
|
||||
if p.Bool("no-config") {
|
||||
r.Config.Create = false
|
||||
c.Config.Create = false
|
||||
}
|
||||
r.Blueprint.Projects = []watcher.Project{}
|
||||
if err := r.Blueprint.Add(p); err != nil {
|
||||
c.Blueprint.Projects = []watcher.Project{}
|
||||
if err := c.Blueprint.Add(p); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package settings
|
||||
|
||||
import (
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
"os"
|
||||
"time"
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
var Dir = ".realize/"
|
||||
|
|
|
@ -178,5 +178,5 @@ func (h *Blueprint) check() error {
|
|||
h.Clean()
|
||||
return nil
|
||||
}
|
||||
return errors.New("there are no projects")
|
||||
return errors.New("There are no projects")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue