Skip to content

Commit

Permalink
Fix cfg in kvarnctl for feature completion
Browse files Browse the repository at this point in the history
  • Loading branch information
Icelk committed Jun 1, 2024
1 parent 99a88b2 commit 07d9271
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ctl/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async fn main() {
.value_hint(ValueHint::Other),
);

#[cfg(feature = "complete")]
#[cfg(feature = "completion")]
{
command = clap_autocomplete::add_subcommand(command);
}
Expand All @@ -106,9 +106,9 @@ async fn main() {
"COMMAND is required unless --wait or complete is used",
);

#[cfg(feature = "complete")]
#[cfg(feature = "completion")]
let mut shell_completion_command = command.clone();
#[cfg(feature = "complete")]
#[cfg(feature = "completion")]
{
shell_completion_command = shell_completion_command
.subcommand(
Expand Down Expand Up @@ -216,7 +216,7 @@ async fn main() {
}
let matches = command.get_matches();

#[cfg(feature = "complete")]
#[cfg(feature = "completion")]
if let Some(result) = clap_autocomplete::test_subcommand(&matches, shell_completion_command) {
if let Err(err) = result {
eprintln!("Insufficient permissions: {err}");
Expand Down

0 comments on commit 07d9271

Please sign in to comment.