Skip to content

Commit

Permalink
Explain why normalizing slashes on vendor config output
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Jul 16, 2022
1 parent f7e1735 commit 88e8892
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cargo/ops/vendor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ fn sync(
config.insert(
merged_source_name.to_string(),
VendorSource::Directory {
// Windows-flavour paths are valid here on Windows but Unix.
// This backslash normalization is for making output paths more
// cross-platform compatible.
directory: opts.destination.to_string_lossy().replace("\\", "/"),
},
);
Expand Down

0 comments on commit 88e8892

Please sign in to comment.