fmt
This commit is contained in:
parent
635f7dec73
commit
7c1066d503
3
exec.go
3
exec.go
|
@ -4,6 +4,7 @@ import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/pkg/errors"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
@ -12,7 +13,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
"github.com/pkg/errors"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// GoCompile is used for compile a project
|
// GoCompile is used for compile a project
|
||||||
|
@ -71,7 +71,6 @@ func (p *Project) goRun(stop <-chan bool, runner chan bool) {
|
||||||
args = append(args, a...)
|
args = append(args, a...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gobin := os.Getenv("GOBIN")
|
gobin := os.Getenv("GOBIN")
|
||||||
path := filepath.Join(gobin, p.name)
|
path := filepath.Join(gobin, p.name)
|
||||||
if _, err := os.Stat(path); err == nil {
|
if _, err := os.Stat(path); err == nil {
|
||||||
|
|
|
@ -70,7 +70,7 @@ func main() {
|
||||||
if err := r.insert(p); err != nil {
|
if err := r.insert(p); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if !p.Bool("no-config") && p.String("name") == ""{
|
if !p.Bool("no-config") && p.String("name") == "" {
|
||||||
if err := r.Settings.record(r); err != nil {
|
if err := r.Settings.record(r); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ func main() {
|
||||||
interact.Run(&interact.Interact{
|
interact.Run(&interact.Interact{
|
||||||
Before: func(context interact.Context) error {
|
Before: func(context interact.Context) error {
|
||||||
context.SetErr(red.bold("INVALID INPUT"))
|
context.SetErr(red.bold("INVALID INPUT"))
|
||||||
context.SetPrfx(color.Output, yellow.regular("[") + time.Now().Format("15:04:05") + yellow.regular("]") + yellow.bold("[")+"REALIZE"+yellow.bold("]"))
|
context.SetPrfx(color.Output, yellow.regular("[")+time.Now().Format("15:04:05")+yellow.regular("]")+yellow.bold("[")+"REALIZE"+yellow.bold("]"))
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
Questions: []*interact.Question{
|
Questions: []*interact.Question{
|
||||||
|
|
Loading…
Reference in New Issue