mirror of
https://github.com/nushell/nushell.git
synced 2025-05-30 14:50:02 +02:00
Formatting
This commit is contained in:
parent
3c3ee08ffe
commit
03febb8cab
@ -96,17 +96,21 @@ impl DirectorySpecificEnvironment {
|
|||||||
keys_in_current_nufile.push(k.clone()); //this is used to keep track of which directory added which variables
|
keys_in_current_nufile.push(k.clone()); //this is used to keep track of which directory added which variables
|
||||||
}
|
}
|
||||||
|
|
||||||
self.overwritten_env_values.insert( //If we are about to overwrite any environment variables, we save them first so they can be restored later.
|
self.overwritten_env_values.insert(
|
||||||
|
//If we are about to overwrite any environment variables, we save them first so they can be restored later.
|
||||||
wdir.to_path_buf(),
|
wdir.to_path_buf(),
|
||||||
keys_in_current_nufile.iter().fold(vec![], |mut keyvals, key| {
|
keys_in_current_nufile
|
||||||
if let Some(val) = std::env::var_os(key) {
|
.iter()
|
||||||
keyvals.push((key.clone(), val));
|
.fold(vec![], |mut keyvals, key| {
|
||||||
}
|
if let Some(val) = std::env::var_os(key) {
|
||||||
keyvals
|
keyvals.push((key.clone(), val));
|
||||||
}),
|
}
|
||||||
|
keyvals
|
||||||
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
self.added_env_vars.insert(wdir.to_path_buf(), keys_in_current_nufile);
|
self.added_env_vars
|
||||||
|
.insert(wdir.to_path_buf(), keys_in_current_nufile);
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
working_dir = working_dir.unwrap().parent();
|
working_dir = working_dir.unwrap().parent();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user