Skip to content

bugfix(cli): don't require --dir for completion commands#2317

Open
prabhavdogra wants to merge 1 commit into
dgraph-io:mainfrom
prabhavdogra:fix/completion-without-dir
Open

bugfix(cli): don't require --dir for completion commands#2317
prabhavdogra wants to merge 1 commit into
dgraph-io:mainfrom
prabhavdogra:fix/completion-without-dir

Conversation

@prabhavdogra

Copy link
Copy Markdown

Fixes #2315.

badger completion bash was failing with --dir not specified because PersistentPreRunE validated flags for all subcommands, including completion. Even with --dir passed, debug output (HTTP server, jemalloc stats) leaked into stdout, breaking shell sourcing.

Skip flag validation and diagnostic output for completion commands. Adds tests for both the fix and the existing --dir enforcement.

@prabhavdogra
prabhavdogra requested a review from a team as a code owner July 15, 2026 08:45
@CLAassistant

CLAassistant commented Jul 15, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

--dir argument required for completions

2 participants