Add message for fleetctl when prepare commands are used (#7152)

This commit is contained in:
Zach Wasserman
2022-08-11 12:26:52 -07:00
committed by GitHub
parent 30d95622c3
commit acf60189ff
2 changed files with 10 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
* Add a message in `fleetctl` notifying that it's the wrong binary for `prepare` subcommands.
+9
View File
@@ -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
}