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"`.
This commit is contained in:
Brendan Shaklovitz 2020-08-07 17:28:24 -05:00 committed by GitHub
parent 09632fb1ed
commit 0cf47bf233
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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,
}