Skip to content

Commit

Permalink
add error enum to
Browse files Browse the repository at this point in the history
  • Loading branch information
Zertsov committed Feb 5, 2024
1 parent 09c398b commit db04bea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/turborepo-dirs/Cargo.toml
Expand Up @@ -8,6 +8,7 @@ license = "MPL-2.0"

[dependencies]
dirs-next = "2.0.0"
thiserror.workspace = true

[lints]
workspace = true
7 changes: 7 additions & 0 deletions crates/turborepo-dirs/src/lib.rs
@@ -1,6 +1,7 @@
use std::path::PathBuf;

use dirs_next::config_dir as dirs_config_dir;
use thiserror::Error;

/// Returns the path to the user's configuration directory. This is a wrapper
/// around `dirs_next::config_dir` that also checks the `TURBO_CONFIG_DIR_PATH`
Expand All @@ -23,3 +24,9 @@ pub fn vercel_config_dir() -> Option<PathBuf> {
}
dirs_config_dir()
}

#[derive(Debug, Error)]
pub enum Error {
#[error("config directory not found")]
ConfigDirNotFound,
}

0 comments on commit db04bea

Please sign in to comment.