Skip to content

fix: allow completion command without storage config#1158

Open
AruneshDwivedi wants to merge 1 commit into
loderunner:mainfrom
AruneshDwivedi:fix/completion-no-storage
Open

fix: allow completion command without storage config#1158
AruneshDwivedi wants to merge 1 commit into
loderunner:mainfrom
AruneshDwivedi:fix/completion-no-storage

Conversation

@AruneshDwivedi

Copy link
Copy Markdown

The generated completion command ran through PersistentPreRunE, which requires a storage type and password, so 'scrt completion bash' failed with 'missing storage type'. The completion command and its subcommands now short-circuit that validation. Added a regression test that asserts PersistentPreRunE returns nil for completion and its bash subcommand.

The generated completion command (and its subcommands) ran through
PersistentPreRunE, which requires a configured storage type and password,
so 'scrt completion bash' failed with 'missing storage type'. Short-circuit
the completion command and its children so generating shell completion does
not require a store. Added a regression test.

Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
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.

1 participant