mirror of
https://github.com/nushell/nushell.git
synced 2025-01-25 23:58:41 +01:00
Working dummy version
This commit is contained in:
parent
83795a3e70
commit
3d15ac076c
28
crates/nu-cli/src/env/environment.rs
vendored
28
crates/nu-cli/src/env/environment.rs
vendored
@ -40,10 +40,24 @@ pub struct Environment {
|
||||
|
||||
impl Environment {
|
||||
pub fn new() -> Environment {
|
||||
Environment {
|
||||
let mut e = Environment {
|
||||
environment_vars: None,
|
||||
path_vars: None,
|
||||
}
|
||||
};
|
||||
e.add_nurc();
|
||||
e
|
||||
}
|
||||
|
||||
pub fn from_config<T: Conf>(configuration: &T) -> Environment {
|
||||
let env = configuration.env();
|
||||
let path = configuration.path();
|
||||
|
||||
let mut e = Environment {
|
||||
environment_vars: env,
|
||||
path_vars: path,
|
||||
};
|
||||
e.add_nurc();
|
||||
e
|
||||
}
|
||||
|
||||
pub fn add_nurc(&mut self) {
|
||||
@ -56,16 +70,6 @@ impl Environment {
|
||||
self.add_env(key, value);
|
||||
}
|
||||
|
||||
pub fn from_config<T: Conf>(configuration: &T) -> Environment {
|
||||
let env = configuration.env();
|
||||
let path = configuration.path();
|
||||
|
||||
Environment {
|
||||
environment_vars: env,
|
||||
path_vars: path,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn morph<T: Conf>(&mut self, configuration: &T) {
|
||||
self.environment_vars = configuration.env();
|
||||
self.path_vars = configuration.path();
|
||||
|
Loading…
Reference in New Issue
Block a user