Add message for fleetctl when prepare commands are used (#7152)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
* Add a message in `fleetctl` notifying that it's the wrong binary for `prepare` subcommands.
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user