Skip to content

Commit

Permalink
Fixes regression in cross-rs#828 with absolute path.
Browse files Browse the repository at this point in the history
Prior to cross-rs#828, we added a '/' separator before component in our
makeshift `as_posix`, so the path would always become absolute, even
though the actual path was relative. `as_posix` therefore handled this
as a relative path, so using `project` and not `/project` as the working
directory for the cross command caused commands to fail.
  • Loading branch information
Alexhuszagh committed Jun 21, 2022
1 parent 0cb97dd commit 7acc36e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/docker/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ pub(crate) fn docker_cwd(
} else {
// We do this to avoid clashes with path separators. Windows uses `\` as a path separator on Path::join
let cwd = &cwd;
let working_dir = Path::new("project").join(cwd.strip_prefix(&metadata.workspace_root)?);
let working_dir = Path::new("/project").join(cwd.strip_prefix(&metadata.workspace_root)?);
docker.args(&["-w", &working_dir.as_posix()?]);
}

Expand Down

0 comments on commit 7acc36e

Please sign in to comment.