diff --git a/changes/fleetctl-prepare b/changes/fleetctl-prepare new file mode 100644 index 0000000000..8e63ccec9e --- /dev/null +++ b/changes/fleetctl-prepare @@ -0,0 +1 @@ +* Add a message in `fleetctl` notifying that it's the wrong binary for `prepare` subcommands. diff --git a/cmd/fleetctl/fleetctl.go b/cmd/fleetctl/fleetctl.go index b5370cc346..f6f078f4be 100644 --- a/cmd/fleetctl/fleetctl.go +++ b/cmd/fleetctl/fleetctl.go @@ -86,6 +86,15 @@ func createApp(reader io.Reader, writer io.Writer, exitErrHandler cli.ExitErrHan hostsCommand(), vulnerabilityDataStreamCommand(), packageCommand(), + { + // It's become common for folks to unintentionally install fleetctl when they actually + // need the Fleet server. This is hopefully a more helpful error message. + Name: "prepare", + Usage: "This is not the binary you're looking for. Please use the fleet server binary for prepare commands.", + Action: func(c *cli.Context) error { + return errors.New("This is not the binary you're looking for. Please use the fleet server binary for prepare commands.") + }, + }, } return app }