fix projects len if
This commit is contained in:
parent
6c8b25b5b6
commit
89ac223e54
|
@ -89,7 +89,8 @@ func (h *Config) Clean() {
|
||||||
// Check, Read and remove duplicates from the config file
|
// Check, Read and remove duplicates from the config file
|
||||||
func (h *Config) Read() error{
|
func (h *Config) Read() error{
|
||||||
if file, err := ioutil.ReadFile(h.file); err == nil{
|
if file, err := ioutil.ReadFile(h.file); err == nil{
|
||||||
if len(h.Projects) <= 0 {
|
fmt.Println(len(h.Projects))
|
||||||
|
if len(h.Projects) > 0 {
|
||||||
err = yaml.Unmarshal(file, h)
|
err = yaml.Unmarshal(file, h)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
h.Clean()
|
h.Clean()
|
||||||
|
|
Loading…
Reference in New Issue