Skip to content

Cannot use input-port flag #506

@ahokinson

Description

@ahokinson

By using the flag, --input-port,

cmd.Flags().IntVar(&flags.inputServerPort, "input-port", 0, "port to use for securely passing input to the updater")

we end up in a situation with both

hasArguments := len(cmd.Flags().Args()) > 0

and

hasServer := flags.inputServerPort != 0

being true at the same time, as a consequence of the use of the flag.

This means that using the flag will always result in an error.

return nil, errors.New("can only use one of: input file, arguments, server, or stdin")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions