Skip to content

Commit

Permalink
Merge pull request #803 from gravitl/NET-1223
Browse files Browse the repository at this point in the history
NET-1223:deprecate Windows cmd install
  • Loading branch information
abhishek9686 authored May 31, 2024
2 parents cebbc41 + 86bef43 commit 0e6aac7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Copyright © 2022 Netmaker Team <[email protected]>
package cmd

import (
"errors"
"runtime"

"github.com/gravitl/netclient/functions"
"github.com/spf13/cobra"
)
Expand All @@ -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()
},
Expand Down

0 comments on commit 0e6aac7

Please sign in to comment.