From 21f8bf5b532373568d7ef8405c4f1d9a4105007e Mon Sep 17 00:00:00 2001 From: fabriciojs Date: Sun, 29 Oct 2023 21:24:22 -0300 Subject: [PATCH 1/3] kool start - midding docker-compose.yml --- commands/start.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commands/start.go b/commands/start.go index 9154841e..337084e4 100644 --- a/commands/start.go +++ b/commands/start.go @@ -1,11 +1,13 @@ package commands import ( + "fmt" "kool-dev/kool/core/builder" "kool-dev/kool/core/environment" "kool-dev/kool/core/network" "kool-dev/kool/services/checker" "kool-dev/kool/services/updater" + "strings" "github.com/spf13/cobra" ) @@ -107,6 +109,9 @@ func (s *KoolStart) Execute(args []string) (err error) { } if err = s.checkDependencies(); err != nil { + if strings.HasPrefix(err.Error(), "no configuration file provided: not found") { + err = fmt.Errorf("could not find docker-compose.yml - check your current working directory.\n\n[err: %v]", err) + } return } From 19e2181ed481244b60c0049871ab1040b47f9f71 Mon Sep 17 00:00:00 2001 From: fabriciojs Date: Sun, 29 Oct 2023 21:36:31 -0300 Subject: [PATCH 2/3] verbose output improv --- core/shell/shell.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/shell/shell.go b/core/shell/shell.go index daeb2bdb..4d947e71 100644 --- a/core/shell/shell.go +++ b/core/shell/shell.go @@ -174,11 +174,11 @@ func (s *DefaultShell) Interactive(originalCmd builder.Command, extraArgs ...str if verbose { checker := NewTerminalChecker() - fmt.Fprintf(s.ErrStream(), "$ (TTY in: %v out: %v) %s %v\n", + fmt.Fprintf(s.ErrStream(), "$ (TTY in: %v out: %v) %s %s\n", checker.IsTerminal(cmdptr.in), checker.IsTerminal(cmdptr.out), cmdptr.Command.Cmd(), - cmdptr.Command.Args(), + strings.Join(cmdptr.Command.Args(), " "), ) } From 89195e6b3ae4d143fca9de0d018ddce3dbe4e223 Mon Sep 17 00:00:00 2001 From: fabriciojs Date: Tue, 31 Oct 2023 11:04:19 -0300 Subject: [PATCH 3/3] one more tweak to verbose mode --- core/shell/shell.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/shell/shell.go b/core/shell/shell.go index 4d947e71..da4c4132 100644 --- a/core/shell/shell.go +++ b/core/shell/shell.go @@ -136,9 +136,9 @@ func (s *DefaultShell) Exec(command builder.Command, extraArgs ...string) (outSt } if verbose { - fmt.Fprintf(s.ErrStream(), "$ (exec) %s %v\n", + fmt.Fprintf(s.ErrStream(), "$ (exec) %s %s\n", exe, - args, + strings.Join(args, " "), ) }