make LESSOPEN support opt-in

This commit is contained in:
Anomalocaridid authored and Martin Nordholts committed 2023-09-08 06:25:20 +02:00
1 parent ac2953c070
commit b56021ffa9
8 files changed
+62 -12

No files matched your search

+1 -1
View File
@@ -282,7 +282,7 @@ impl App {
.unwrap_or_default(),
use_custom_assets: !self.matches.get_flag("no-custom-assets"),
#[cfg(feature = "lessopen")]
use_lessopen: !self.matches.get_flag("no-lessopen"),
use_lessopen: self.matches.get_flag("lessopen"),
})
}
+15 -7
View File
@@ -501,13 +501,21 @@ pub fn build_app(interactive_output: bool) -> Command {
#[cfg(feature = "lessopen")]
{
app = app.arg(
Arg::new("no-lessopen")
.long("no-lessopen")
.action(ArgAction::SetTrue)
.hide(true)
.help("Do not use the $LESSOPEN preprocessor"),
)
app = app
.arg(
Arg::new("lessopen")
.long("lessopen")
.action(ArgAction::SetTrue)
.help("Enable the $LESSOPEN preprocessor"),
)
.arg(
Arg::new("no-lessopen")
.long("no-lessopen")
.action(ArgAction::SetTrue)
.overrides_with("lessopen")
.hide(true)
.help("Disable the $LESSOPEN preprocessor if enabled (overrides --lessopen)"),
)
}
app = app