mirror of
https://github.com/nushell/nushell.git
synced 2025-06-08 19:17:16 +02:00
Check hashes
This commit is contained in:
parent
3a0ada6486
commit
0d44ddd798
@ -30,6 +30,21 @@ impl DirectorySpecificEnvironment {
|
||||
}
|
||||
}
|
||||
|
||||
// fn check_hashes(&self, wdir: PathBuf) -> std::io::Result<bool> {
|
||||
// if let Some(trusted) = &self.trusted {
|
||||
// let wdirenv = wdir.join(".nu-env");
|
||||
// if wdirenv.exists() {
|
||||
// let content = std::fs::read_to_string(&wdirenv)?;
|
||||
// let mut hasher = DefaultHasher::new();
|
||||
// content.hash(&mut hasher);
|
||||
// return Ok(trusted.files.get(wdirenv.to_str().unwrap())
|
||||
// == Some(&hasher.finish().to_string()));
|
||||
// }
|
||||
// }
|
||||
|
||||
// Ok(true)
|
||||
// }
|
||||
|
||||
pub fn env_vars_to_add(&mut self) -> std::io::Result<IndexMap<EnvKey, EnvVal>> {
|
||||
let current_dir = std::env::current_dir()?;
|
||||
let mut working_dir = Some(current_dir.as_path());
|
||||
|
Loading…
x
Reference in New Issue
Block a user