mirror of
https://github.com/nushell/nushell.git
synced 2025-08-12 10:20:21 +02:00
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:
committed by
GitHub
parent
50cbf91bc5
commit
10d4edc7af
@ -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))?;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user