paths: Replace lazy_static! with OnceLock (#13213)

This PR replaces the `lazy_static!` usages in the `paths` crate with
`OnceLock` from the standard library.

This allows us to drop the `lazy_static` dependency from this crate.

The paths are now exposed as accessor functions that reference a private
static value.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers authored and GitHub committed 2024-06-18 12:22:37 -04:00
1 parent 75c1ba61cc
commit 00f50ea97b
27 files changed
+320 -170

No files matched your search

+1 -1
View File
@@ -138,7 +138,7 @@ impl RealNodeRuntime {
};
let folder_name = format!("node-{VERSION}-{os}-{arch}");
let node_containing_dir = paths::SUPPORT_DIR.join("node");
let node_containing_dir = paths::support_dir().join("node");
let node_dir = node_containing_dir.join(folder_name);
let node_binary = node_dir.join(NODE_PATH);
let npm_file = node_dir.join(NPM_PATH);