diff --git a/lib/src/workspace.rs b/lib/src/workspace.rs index 4cd5c8a55f..6a66ae9525 100644 --- a/lib/src/workspace.rs +++ b/lib/src/workspace.rs @@ -131,17 +131,29 @@ fn init_working_copy( } impl Workspace { - fn new( + pub fn new( workspace_root: &Path, working_copy: Box, repo_loader: RepoLoader, ) -> Result { let workspace_root = workspace_root.canonicalize().context(workspace_root)?; - Ok(Workspace { + Ok(Self::new_no_canonicalize( + workspace_root, + working_copy, + repo_loader, + )) + } + + pub fn new_no_canonicalize( + workspace_root: PathBuf, + working_copy: Box, + repo_loader: RepoLoader, + ) -> Self { + Self { workspace_root, repo_loader, working_copy, - }) + } } pub fn init_local(