fix: correct help text and dead flag references in several commands - #998
Merged
Merged
Conversation
- egress update-layout/update-stream: accept the egress ID positionally or via --id - egress start and deprecated start-*: point at cmd/lk/examples - egress test-template: name the flag --base-url (it was unreadable before) - dispatch list/get/create/delete, number purchase/get/update: add --json - room participants list: describe the command correctly - room update: document --metadata as required; drop the unused hidden --room - room delete: ArgsUsage says ROOM_NAME, matching what DeleteRoom takes - room create: add the referenced examples/auto-participant-egress.json - token create: read --room-configuration, the flag that is actually defined - sip dispatch delete: say it takes dispatch rule IDs - SIP media flags: drop "outbound call" wording; note --no-default-codecs needs --codecs
# Conflicts: # autocomplete/fish_autocomplete
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
While writing the full CLI reference docs (livekit/web#6370), several commands turned out to have help text that doesn't match their behavior, or flags that the code reads but never defines. A few of these are real bugs, not just wording:
egress update-layoutshows a positionalIDin its usage line, but--idis required, soupdate-layout IDfails withRequired flag "id" not set.egress test-templatenames its flag--base-url (e.g. https://recorder.livekit.io/#), socmd.String("base-url")always returned"".token create --room-configurationwas ignored after Add agent dispatch commands #473, because the code switched to reading an undefinedroom-preset.dispatchandnumber get/update/purchasehave--jsonoutput code, but the flag isn't defined, so--jsonis rejected.Changes
update-layoutusage no longer shows a positionalID;--idstays required. The flag is renamed to--base-url, with the example moved into its usage text. Example paths now point atcmd/lk/examples.jsonFlagto every command that already checksjson.participants listnow has its own description.updateshows--metadataas required (urfave/cli doesn't mark it), and the hidden--roomflag, which was never read, is removed.deleteshowsROOM_NAME, which matchesDeleteRoomRequest.room. Adds the missingexamples/auto-participant-egress.jsonthatcreaterefers to.--room-configurationagain.dispatch deletesays it takes dispatch rule IDs. Media flag help no longer says "outbound call", and--no-default-codecsnow says it only has an effect together with--codecs.Verification
go build ./...,go vet ./cmd/lk/, andgo test ./cmd/lk/...pass.--helpoutput for each changed command.AutoParticipantEgresswithprotojson.No new tests: these are flag definitions and help strings, with no behavior to exercise beyond the help output.