fast command additional params
This commit is contained in:
parent
ccbab021e4
commit
a555c2c0ff
|
@ -3,6 +3,7 @@ package realize
|
|||
import (
|
||||
"fmt"
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"gopkg.in/urfave/cli.v2"
|
||||
"log"
|
||||
"math/big"
|
||||
"os"
|
||||
|
@ -40,9 +41,10 @@ func (h *Config) Watch() error {
|
|||
}
|
||||
|
||||
// Fast method run a project from his working directory without makes a config file
|
||||
func (h *Config) Fast() error {
|
||||
func (h *Config) Fast(params *cli.Context) error {
|
||||
fast := h.Projects[0]
|
||||
// Takes the values from config if wd path match with another path
|
||||
// Takes the values from config if wd path match someone else
|
||||
if params.Bool("config") {
|
||||
if err := h.Read(); err == nil {
|
||||
for _, val := range h.Projects {
|
||||
fmt.Println(val)
|
||||
|
@ -51,6 +53,7 @@ func (h *Config) Fast() error {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
wg.Add(1)
|
||||
fast.Name = fast.Path
|
||||
fast.Path = ""
|
||||
|
|
Loading…
Reference in New Issue