fmt
This commit is contained in:
parent
16b5e82a7e
commit
c8a7116ec7
|
@ -65,11 +65,17 @@ impl DirectorySpecificEnvironment {
|
|||
toml_doc
|
||||
.get("env")
|
||||
.ok_or_else(|| {
|
||||
Error::new(ErrorKind::InvalidData, format!("[env] section missing in {:?}", wdirenv))
|
||||
Error::new(
|
||||
ErrorKind::InvalidData,
|
||||
format!("[env] section missing in {:?}", wdirenv),
|
||||
)
|
||||
})?
|
||||
.as_table()
|
||||
.ok_or_else(|| {
|
||||
Error::new(ErrorKind::InvalidData, format!("[env] section malformed in {:?}", wdirenv))
|
||||
Error::new(
|
||||
ErrorKind::InvalidData,
|
||||
format!("[env] section malformed in {:?}", wdirenv),
|
||||
)
|
||||
})?
|
||||
.iter()
|
||||
.for_each(|(dir_env_key, dir_env_val)| {
|
||||
|
|
2
crates/nu-cli/src/env/environment.rs
vendored
2
crates/nu-cli/src/env/environment.rs
vendored
|
@ -1,10 +1,10 @@
|
|||
use crate::data::config::Conf;
|
||||
use crate::env::directory_specific_environment::*;
|
||||
use indexmap::{indexmap, IndexSet};
|
||||
use nu_errors::ShellError;
|
||||
use nu_protocol::{UntaggedValue, Value};
|
||||
use std::ffi::OsString;
|
||||
use std::fmt::Debug;
|
||||
use nu_errors::ShellError;
|
||||
|
||||
pub trait Env: Debug + Send {
|
||||
fn env(&self) -> Option<Value>;
|
||||
|
|
2
crates/nu-cli/src/env/environment_syncer.rs
vendored
2
crates/nu-cli/src/env/environment_syncer.rs
vendored
|
@ -1,9 +1,9 @@
|
|||
use crate::context::Context;
|
||||
use crate::data::config::{Conf, NuConfig};
|
||||
use crate::env::environment::{Env, Environment};
|
||||
use nu_source::Text;
|
||||
use parking_lot::Mutex;
|
||||
use std::sync::Arc;
|
||||
use nu_source::Text;
|
||||
|
||||
pub struct EnvironmentSyncer {
|
||||
pub env: Arc<Mutex<Box<Environment>>>,
|
||||
|
|
Loading…
Reference in New Issue
Block a user