startup fixed
This commit is contained in:
parent
d36d51257e
commit
9415a9d28f
|
@ -36,7 +36,6 @@ func main() {
|
||||||
Server server.Server `yaml:"-"`
|
Server server.Server `yaml:"-"`
|
||||||
Projects *[]watcher.Project `yaml:"projects" json:"projects"`
|
Projects *[]watcher.Project `yaml:"projects" json:"projects"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var r realize
|
var r realize
|
||||||
// Before of every exec of a cli method
|
// Before of every exec of a cli method
|
||||||
before := func(*cli.Context) error {
|
before := func(*cli.Context) error {
|
||||||
|
@ -76,9 +75,8 @@ func main() {
|
||||||
r.Projects = &r.Blueprint.Projects
|
r.Projects = &r.Blueprint.Projects
|
||||||
|
|
||||||
// read if exist
|
// read if exist
|
||||||
if err := r.Read(&r); err != nil {
|
r.Read(&r)
|
||||||
return err
|
|
||||||
}
|
|
||||||
// increase the file limit
|
// increase the file limit
|
||||||
if r.Config.Flimit != 0 {
|
if r.Config.Flimit != 0 {
|
||||||
if err := r.Flimit(); err != nil {
|
if err := r.Flimit(); err != nil {
|
||||||
|
@ -87,7 +85,6 @@ func main() {
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
app := &cli.App{
|
app := &cli.App{
|
||||||
Name: "Realize",
|
Name: "Realize",
|
||||||
Version: appVersion,
|
Version: appVersion,
|
||||||
|
@ -956,7 +953,6 @@ func main() {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := app.Run(os.Args); err != nil {
|
if err := app.Run(os.Args); err != nil {
|
||||||
fmt.Println(style.Red.Bold(err))
|
fmt.Println(style.Red.Bold(err))
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
|
Loading…
Reference in New Issue