Skip to content

Commit 2e977a4

Browse files
committed
rebase
1 parent 38573c5 commit 2e977a4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

crates/vite_task/src/config/workspace.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl Workspace {
4343
/// Determines the current package path relative to the workspace root.
4444
/// Returns an empty string if the current directory is the workspace root itself.
4545
/// Returns the workspace root and the current package path.
46-
fn determine_current_package_path(original_cwd: &Path) -> Result<(PathBuf, String), Error> {
46+
fn determine_current_package_path(original_cwd: &Path) -> Result<(&Path, String), Error> {
4747
let workspace_root = find_workspace_root(original_cwd)?.path;
4848
let current_package_root = find_package_root(original_cwd)?.path;
4949
if current_package_root == workspace_root {
@@ -55,7 +55,7 @@ impl Workspace {
5555
Error::PathPrefixError {
5656
err,
5757
message: "package root is not a subpath of workspace root".to_string(),
58-
path: current_package_root.clone(),
58+
path: current_package_root.to_path_buf(),
5959
}
6060
})?;
6161
Ok((workspace_root, path.to_string_lossy().to_string()))
@@ -105,7 +105,7 @@ impl Workspace {
105105

106106
Ok(Self {
107107
package_graph: Graph::new(),
108-
dir: workspace_root,
108+
dir: workspace_root.to_path_buf(),
109109
current_package_path,
110110
task_cache,
111111
fs: CachedFileSystem::default(),
@@ -185,7 +185,7 @@ impl Workspace {
185185

186186
Ok(Self {
187187
package_graph,
188-
dir: workspace_root,
188+
dir: workspace_root.to_path_buf(),
189189
current_package_path,
190190
task_cache,
191191
fs: CachedFileSystem::default(),

0 commit comments

Comments
 (0)