Slim down configuration readings and nu_cli clean up. (#2559)

We continue refactoring nu_cli and slim down a bit configuration
readings with a naive metadata `modified` field check.
This commit is contained in:
Andrés N. Robalino
2020-09-16 18:22:58 -05:00
committed by GitHub
parent 50cbf91bc5
commit 10d4edc7af
12 changed files with 632 additions and 387 deletions

View File

@ -1,7 +1,7 @@
use clap::{App, Arg};
use log::LevelFilter;
use nu_cli::create_default_context;
use nu_cli::utils::test_bins as binaries;
use nu_cli::{create_default_context, EnvironmentSyncer};
use std::error::Error;
use std::fs::File;
use std::io::{prelude::*, BufReader};
@ -160,14 +160,13 @@ fn main() -> Result<(), Box<dyn Error>> {
}
None => {
let mut syncer = EnvironmentSyncer::new();
let mut context = create_default_context(&mut syncer, true)?;
let mut context = create_default_context(true)?;
if !matches.is_present("skip-plugins") {
let _ = nu_cli::register_plugins(&mut context);
}
futures::executor::block_on(nu_cli::cli(syncer, context))?;
futures::executor::block_on(nu_cli::cli(context))?;
}
}