From 0cf47bf233d142a997e0ab85820bed0fdb2bf615 Mon Sep 17 00:00:00 2001 From: Brendan Shaklovitz Date: Fri, 7 Aug 2020 17:28:24 -0500 Subject: [PATCH] Fix fleetctl get options typo (#2281) Fixes issue where `fleetctl get options` returns `option` (singular) as `kind` instead of `options` (plural). This would cause `fleetctl apply -f options.yml` to fail on options yaml generated by `fleetctl get options` with this error: `unknown kind "option"`. --- cmd/fleetctl/apply.go | 2 +- cmd/fleetctl/get.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/fleetctl/apply.go b/cmd/fleetctl/apply.go index 7ba3751b7e..73c5fbbecc 100644 --- a/cmd/fleetctl/apply.go +++ b/cmd/fleetctl/apply.go @@ -78,7 +78,7 @@ func specGroupFromBytes(b []byte) (*specGroup, error) { var optionSpec *kolide.OptionsSpec if err := yaml.Unmarshal(s.Spec, &optionSpec); err != nil { - return nil, errors.Wrap(err, "unmarshaling option spec") + return nil, errors.Wrap(err, "unmarshaling options spec") } specs.Options = optionSpec diff --git a/cmd/fleetctl/get.go b/cmd/fleetctl/get.go index 3145b5f4a4..e0e5d7fa7a 100644 --- a/cmd/fleetctl/get.go +++ b/cmd/fleetctl/get.go @@ -118,7 +118,7 @@ func printPack(c *cli.Context, pack *kolide.PackSpec) error { func printOption(c *cli.Context, option *kolide.OptionsSpec) error { spec := specGeneric{ - Kind: "option", + Kind: "options", Version: kolide.ApiVersion, Spec: option, }