Skip to content

Commit

Permalink
Merge #831
Browse files Browse the repository at this point in the history
831: Fixes regression in #828 with absolute path. r=Emilgardis a=Alexhuszagh

Prior to #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.

Co-authored-by: Alex Huszagh <[email protected]>
  • Loading branch information
bors[bot] and Alexhuszagh authored Jun 21, 2022
2 parents 0cb97dd + 7acc36e commit 05c4490
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 05c4490

Please sign in to comment.