projects names fixed

This commit is contained in:
alessio 2016-08-22 00:09:27 +02:00
parent 1ec7938974
commit c5d61e2afd
2 changed files with 2 additions and 3 deletions

View File

@ -21,7 +21,7 @@ type Config struct {
// NameParam check the project name presence. If empty takes the working directory name // NameParam check the project name presence. If empty takes the working directory name
func nameParam(params *cli.Context) string { func nameParam(params *cli.Context) string {
var name string var name string
if params.String("name") == "" && params.String("path") == "/"{ if params.String("name") == "" && params.String("path") == ""{
dir, err := os.Getwd() dir, err := os.Getwd()
if err != nil { if err != nil {
log.Fatal(Red(err)) log.Fatal(Red(err))

View File

@ -47,7 +47,6 @@ func (h *Config) Fast(params *cli.Context) error {
if params.Bool("config") { if params.Bool("config") {
if err := h.Read(); err == nil { if err := h.Read(); err == nil {
for _, val := range h.Projects { for _, val := range h.Projects {
fmt.Println(val)
if fast.Path == val.Path { if fast.Path == val.Path {
fast = val fast = val
} }
@ -55,7 +54,7 @@ func (h *Config) Fast(params *cli.Context) error {
} }
} }
wg.Add(1) wg.Add(1)
fast.Path = "" fast.Path = slash(fast.Path)
go fast.Watching() go fast.Watching()
wg.Wait() wg.Wait()
return nil return nil