Repository: mitsuhiko/minijinja (language: rust)

Issue:
clap_builder error for --no-default-features build of minijinja-cli
## Description

I've installed minijinja-cli with no default features

## Reproduction steps

1. `cargo install minijinja-cli --no-default-features --version 1.0.9 --locked`
2. `minijinja-cli`
3. Error ```thread 'main' panicked at /home/paolo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.3.22/src/parser/matches/arg_matches.rs:181:17:
arg `repl`'s `ArgAction` should be one of `SetTrue`, `SetFalse` which should provide a default```

Additional helpful information:

- Version of minijinja-cli: `1.0.9`
- Version of rustc: `rustc 1.75.0-nightly (a2f5f9691 2023-11-02)`
- Operating system and version: `Arch Linux`

## What did you expect

I expected it to work.





Discussion / hints:
I'm not sure what's going on but I cannot reproduce this. I wonder if this in issue with nightly.
I've also tried on stable `cargo 1.73.0 (9c4383fb5 2023-08-26)` and it still happens :thinking: 
I am super confused how this is happening. I do not have a linux machine but it doesn't happen to me on windows or macos.
Nevermind. I can reproduce.

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f4f6114b..7147e017 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,8 @@ All notable changes to MiniJinja are documented here.
 
 - Added `int` and `float` filters.  #372
 - Added `integer` and `float` tests.  #373
+- Fixed an issue that caused the CLI not to run when the `repl` feature
+  was disabled.  #374
 
 ## 1.0.9
 
diff --git a/minijinja-cli/src/main.rs b/minijinja-cli/src/main.rs
index 217d1ebf..1db947b1 100644
--- a/minijinja-cli/src/main.rs
+++ b/minijinja-cli/src/main.rs
@@ -299,7 +299,7 @@ fn execute() -> Result<i32, Error> {
             }
             _ => unreachable!(),
         }
-    } else if matches.get_flag("repl") {
+    } else if cfg!(feature = "repl") && matches.get_flag("repl") {
         #[cfg(feature = "repl")]
         {
             repl::run(env, ctx)?;


Test patch: