Skip to content

Conversation

@davidliu
Copy link
Contributor

The optional/hidden functions modify the original flag passed in rather than create their own copy. This ends up displaying the wrong options in the help menu for a command. For example, lk room send-data requires the --room flag, but running help on the command gives this:

NAME:
   lk room send-data - Send arbitrary JSON data to client

USAGE:
   lk room send-data [OPTIONS] DATA

OPTIONS:
   --topic TOPIC                          TOPIC of the message
   --identity value [ --identity value ]  One or more participant identities to send the message to. When empty, broadcasts to the entire room
   --help, -h                             show help (default: false)

It also allows running the command itself, not raising that the room flag wasn't set.

@davidliu davidliu requested a review from rektdeckard August 27, 2024 19:17
@rektdeckard
Copy link
Member

Thanks for spotting!

@davidliu davidliu merged commit 9287b82 into main Aug 27, 2024
@davidliu davidliu deleted the dl/fix_optional_hidden branch August 27, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants