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 } diff --git a/core/shell/shell.go b/core/shell/shell.go index daeb2bdb..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, " "), ) } @@ -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(), " "), ) }