start fixed with no config
This commit is contained in:
parent
153ea7defa
commit
600b1ac467
15
realize.go
15
realize.go
|
@ -1118,20 +1118,17 @@ func setup(c *cli.Context) (err error) {
|
||||||
// Start realize workflow
|
// Start realize workflow
|
||||||
func start(c *cli.Context) (err error) {
|
func start(c *cli.Context) (err error) {
|
||||||
// set legacy watcher
|
// set legacy watcher
|
||||||
if c.Bool("legacy"){
|
if c.Bool("legacy") {
|
||||||
r.Settings.Legacy.Set(c.Bool("legacy"),1)
|
r.Settings.Legacy.Set(c.Bool("legacy"), 1)
|
||||||
}
|
}
|
||||||
// set server
|
// set server
|
||||||
if c.Bool("server"){
|
if c.Bool("server") {
|
||||||
r.Server.Set(c.Bool("server"), c.Bool("open"),realize.Port,realize.Host)
|
r.Server.Set(c.Bool("server"), c.Bool("open"), realize.Port, realize.Host)
|
||||||
}
|
}
|
||||||
// check no-config and read
|
// check no-config and read
|
||||||
if !c.Bool("no-config") {
|
if !c.Bool("no-config") {
|
||||||
// read a config if exist
|
// read a config if exist
|
||||||
err := r.Settings.Read(&r)
|
r.Settings.Read(&r)
|
||||||
if err != nil{
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if c.String("name") != "" {
|
if c.String("name") != "" {
|
||||||
// filter by name flag if exist
|
// filter by name flag if exist
|
||||||
r.Schema.Projects = r.Schema.Filter("Name", c.String("name"))
|
r.Schema.Projects = r.Schema.Filter("Name", c.String("name"))
|
||||||
|
@ -1146,7 +1143,7 @@ func start(c *cli.Context) (err error) {
|
||||||
}
|
}
|
||||||
// check project list length
|
// check project list length
|
||||||
if len(r.Schema.Projects) <= 0 {
|
if len(r.Schema.Projects) <= 0 {
|
||||||
println("len",r.Schema.Projects)
|
println("len", r.Schema.Projects)
|
||||||
// create a new project based on given params
|
// create a new project based on given params
|
||||||
project := r.Schema.New(c)
|
project := r.Schema.New(c)
|
||||||
// Add to projects list
|
// Add to projects list
|
||||||
|
|
Loading…
Reference in New Issue