Skip to content

Commit

Permalink
Change default value for work_directory on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
dlachaume committed Nov 10, 2023
1 parent f3851d9 commit 1ad2d6f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mithril-test-lab/mithril-end-to-end/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ pub struct Args {
/// will be located.
///
/// Optional: if not set it will default to `{system_temp_folder}/mithril-end-to-end`
/// Exception for MacOS: default is `./mithril-end-to-end` as the length of the temporary directory's path
/// is too long. It causes the maximum path size of the node.sock file to be exceeded.
#[clap(long)]
work_directory: Option<PathBuf>,

Expand Down Expand Up @@ -74,6 +76,9 @@ async fn main() -> StdResult<()> {
path.canonicalize().unwrap()
}
None => {
#[cfg(target_os = "macos")]
let work_dir = PathBuf::from("./mithril_end_to_end");
#[cfg(not(target_os = "macos"))]
let work_dir = std::env::temp_dir().join("mithril_end_to_end");
create_workdir_if_not_exist_clean_otherwise(&work_dir);
work_dir.canonicalize().unwrap()
Expand Down

0 comments on commit 1ad2d6f

Please sign in to comment.