Skip to content

Commit

Permalink
use options when reading console args
Browse files Browse the repository at this point in the history
  • Loading branch information
danilopedraza committed Oct 8, 2024
1 parent 43b55e2 commit ddf361b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ fn run_file(path: &str) -> ExitCode {
}

fn run_komodo(args: &[String]) -> ExitCode {
if args.len() == 1 {
if let Some(path) = args.get(1) {
run_file(path)
} else {
#[cfg(feature = "repl")]
repl(
&mut MyCLI::default(),
ExecContext::new(get_reference_path(".")),
);
ExitCode::SUCCESS
} else {
run_file(&args[1])
}
}

Expand Down

0 comments on commit ddf361b

Please sign in to comment.