put tmp clearing as TODO

This commit is contained in:
evan-schott 2024-01-04 10:23:43 -08:00
parent 859ecdebdc
commit 3b79e4f38d
2 changed files with 5 additions and 5 deletions

View File

@ -158,7 +158,6 @@ mod tests {
// Set current directory to temporary directory
let temp_dir = temp_dir();
let project_directory = temp_dir.join("nested");
// let registry = temp_dir.join(".aleo").join("registry").join("testnet3");
// Create file structure
test_helpers::sample_nested_package(&temp_dir);
@ -182,7 +181,8 @@ mod tests {
run_with_args(run).expect("Failed to execute `leo run`");
});
// Clear tmp directory
// TODO: Clear tmp directory
// let registry = temp_dir.join(".aleo").join("registry").join("testnet3");
// std::fs::remove_dir_all(registry).unwrap();
// std::fs::remove_dir_all(project_directory).unwrap();
}
@ -225,7 +225,7 @@ mod tests {
run_with_args(run).expect("Failed to execute `leo run`");
});
// Clear tmp directory
// TODO: Clear tmp directory
// std::fs::remove_dir_all(project_directory).unwrap();
}
}

View File

@ -347,14 +347,14 @@ fn retrieve_local(name: &String, path: &PathBuf) -> Result<Vec<Dependency>, Util
if !lock_path.exists() {
std::fs::create_dir_all(path).map_err(|err| {
UtilError::util_file_io_error(
format!("Could create directory {}", lock_path.to_str().unwrap()),
format!("Couldn't create directory {}", lock_path.to_str().unwrap()),
err,
Default::default(),
)
})?;
File::create(lock_path.clone()).map_err(|err| {
UtilError::util_file_io_error(
format!("Could create file {}", lock_path.to_str().unwrap()),
format!("Couldn't create file {}", lock_path.to_str().unwrap()),
err,
Default::default(),
)