From c6867f10cfc67c11d90f435683933008236d5a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jules=20Cast=C3=A9ran?= Date: Wed, 21 Sep 2022 15:53:02 +0200 Subject: [PATCH] fix(shell): disable shell on freebsd (#2522) --- internal/core/shell.go | 4 ++++ internal/core/shell_disabled.go | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 internal/core/shell_disabled.go diff --git a/internal/core/shell.go b/internal/core/shell.go index 471e4c7296..25347e383f 100644 --- a/internal/core/shell.go +++ b/internal/core/shell.go @@ -1,3 +1,7 @@ +//go:build !freebsd +// +build !freebsd + +// shell is disabled on freebsd as current version of github.com/pkg/term@v1.1.0 is not compiling package core import ( diff --git a/internal/core/shell_disabled.go b/internal/core/shell_disabled.go new file mode 100644 index 0000000000..598adeb7ce --- /dev/null +++ b/internal/core/shell_disabled.go @@ -0,0 +1,19 @@ +//go:build freebsd +// +build freebsd + +package core + +import ( + "context" + "fmt" + "os" + + "github.com/spf13/cobra" +) + +func RunShell(ctx context.Context, printer *Printer, meta *meta, rootCmd *cobra.Command, args []string) { + err := printer.Print(fmt.Errorf("shell is currently disabled on freebsd"), nil) + if err != nil { + _, _ = fmt.Fprintln(os.Stderr, err) + } +}