diff --git a/cmd/install.go b/cmd/install.go index 4c251a73..01f735e4 100644 --- a/cmd/install.go +++ b/cmd/install.go @@ -4,6 +4,9 @@ Copyright © 2022 Netmaker Team package cmd import ( + "errors" + "runtime" + "github.com/gravitl/netclient/functions" "github.com/spf13/cobra" ) @@ -17,6 +20,13 @@ var installCmd = &cobra.Command{ ./netclient install [command options] [arguments] ensure you specify the full path to then new binary to be installed`, + PreRunE: func(cmd *cobra.Command, args []string) error { + if runtime.GOOS == "windows" { + cmd.SilenceUsage = true + return errors.New("cmd install on Windows is deprecated, please install with msi installer") + } + return nil + }, Run: func(cmd *cobra.Command, args []string) { functions.Install() },