We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 363caf8 commit 7351651Copy full SHA for 7351651
crates/turborepo-dirs/src/lib.rs
@@ -12,3 +12,14 @@ pub fn config_dir() -> Option<PathBuf> {
12
}
13
dirs_config_dir()
14
15
+
16
+/// Returns the path to the user's configuration directory. This is a wrapper
17
+/// around `dirs_next::config_dir` that also checks the `VERCEL_CONFIG_DIR_PATH`
18
+/// environment variable. If the environment variable is set, it will return
19
+/// that path instead of `dirs_next::config_dir`.
20
+pub fn vercel_config_dir() -> Option<PathBuf> {
21
+ if let Ok(dir) = std::env::var("VERCEL_CONFIG_DIR_PATH") {
22
+ return Some(PathBuf::from(dir));
23
+ }
24
+ dirs_config_dir()
25
+}
0 commit comments