Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/launcher/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ func ParseOptions(subcommandName string, args []string) (*Options, error) {
ffOpts := []ff.Option{
ff.WithConfigFileFlag("config"),
ff.WithConfigFileParser(ff.PlainParser),
ff.WithIgnoreUndefined(true), // silently discard any unknown options and keep parsing
}

// Windows doesn't really support environmental variables in quite
Expand All @@ -290,6 +291,9 @@ func ParseOptions(subcommandName string, args []string) (*Options, error) {
ffOpts = append(ffOpts, ff.WithEnvVarPrefix("KOLIDE_LAUNCHER"))
}

// TODO for discussion - i suspect with WithIgnoreUndefined set we could
// check for and return errors here and that would be less confusing if there
// are ever other parsing issues. Currently we would have no idea
ff.Parse(flagset, args, ffOpts...)

// handle --version
Expand Down