config flag fixed
This commit is contained in:
parent
a0aace6733
commit
55ce5f2be4
2
main.go
2
main.go
|
@ -70,7 +70,7 @@ func main() {
|
||||||
&cli.BoolFlag{Name: "run", Usage: "Disable go run"},
|
&cli.BoolFlag{Name: "run", Usage: "Disable go run"},
|
||||||
&cli.BoolFlag{Name: "bin", Usage: "Disable go install"},
|
&cli.BoolFlag{Name: "bin", Usage: "Disable go install"},
|
||||||
&cli.BoolFlag{Name: "fmt", Usage: "Disable gofmt"},
|
&cli.BoolFlag{Name: "fmt", Usage: "Disable gofmt"},
|
||||||
&cli.BoolFlag{Name: "config", Usage: "If there is a config file with a project for the current directory take that configuration"},
|
&cli.BoolFlag{Name: "config", Value: false, Usage: "If there is a config file with a project for the current directory take that configuration"},
|
||||||
},
|
},
|
||||||
Action: func(p *cli.Context) error {
|
Action: func(p *cli.Context) error {
|
||||||
y := r.New(p)
|
y := r.New(p)
|
||||||
|
|
|
@ -45,7 +45,6 @@ func (h *Config) Fast(params *cli.Context) error {
|
||||||
fast := h.Projects[0]
|
fast := h.Projects[0]
|
||||||
// Takes the values from config if wd path match someone else
|
// Takes the values from config if wd path match someone else
|
||||||
if params.Bool("config") {
|
if params.Bool("config") {
|
||||||
fmt.Println(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 {
|
||||||
if fast.Path == val.Path {
|
if fast.Path == val.Path {
|
||||||
|
|
Loading…
Reference in New Issue