Allow context and debug flags after fleetctl generate subcommands (#15934)

This commit is contained in:
Sarah Gillespie
2024-01-05 12:08:58 -06:00
committed by GitHub
parent fa14eaf63a
commit caac8fbbe2
3 changed files with 7 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
- Fixed bug where fleetctl did not allow placement of `--context` and `--debug` flages following the `generate mdm-apple` and `generate mdm-apple-bm` commands.
+4
View File
@@ -38,6 +38,8 @@ func generateMDMAppleCommand() *cli.Command {
Aliases: []string{"mdm_apple"},
Usage: "Generates certificate signing request (CSR) and key for Apple Push Notification Service (APNs) and certificate and key for Simple Certificate Enrollment Protocol (SCEP) to turn on MDM features.",
Flags: []cli.Flag{
contextFlag(),
debugFlag(),
&cli.StringFlag{
Name: "email",
Usage: "The email address to send the signed APNS csr to.",
@@ -132,6 +134,8 @@ func generateMDMAppleBMCommand() *cli.Command {
Aliases: []string{"mdm_apple_bm"},
Usage: "Generate Apple Business Manager public and private keys to enable automatic enrollment for macOS hosts.",
Flags: []cli.Flag{
contextFlag(),
debugFlag(),
&cli.StringFlag{
Name: "public-key",
Usage: "The output path for the Apple Business Manager public key certificate.",
+2
View File
@@ -86,6 +86,8 @@ func TestGenerateMDMApple(t *testing.T) {
"--apns-key", apnsKeyPath,
"--scep-cert", scepCertPath,
"--scep-key", scepKeyPath,
"--debug",
"--context", "default",
})
require.Contains(t, out, fmt.Sprintf("Generated your APNs key at %s", apnsKeyPath))