Skip to content

Commit

Permalink
Replace opt-out flag with opt-in flag, for erroring on external fallb…
Browse files Browse the repository at this point in the history
…acks
  • Loading branch information
IFcoltransG committed Aug 28, 2024
1 parent 058d801 commit 367cb6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli-player/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ struct Args {
pub auto_play: bool,

/// Allow external function fallbacks
#[arg(short, default_value_t = false)]
pub external_fallbacks: bool,
#[arg(short='e', default_value_t = false)]
pub forbid_external_fallbacks: bool,
}

enum Command {
Expand Down Expand Up @@ -72,7 +72,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut story = Story::new(json_string_without_bom)?;
let err_handler = EHandler::new();
story.set_error_handler(err_handler.clone());
story.set_allow_external_function_fallbacks(args.external_fallbacks);
story.set_allow_external_function_fallbacks(!args.forbid_external_fallbacks);

let mut end = false;

Expand Down

0 comments on commit 367cb6d

Please sign in to comment.