mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
fix(package): Normalize cargo.toml to Cargo.toml for windows
This commit is contained in:
parent
5dd39df6f1
commit
bbb6aff67a
@ -239,15 +239,17 @@ fn build_ar_list(
|
||||
})?
|
||||
.to_string();
|
||||
match rel_str.as_ref() {
|
||||
"Cargo.toml" => {
|
||||
"Cargo.toml" |
|
||||
// normalize for case insensitive filesystems (like on Windows)
|
||||
"cargo.toml" => {
|
||||
result.push(ArchiveFile {
|
||||
rel_path: PathBuf::from(ORIGINAL_MANIFEST_FILE),
|
||||
rel_str: ORIGINAL_MANIFEST_FILE.to_string(),
|
||||
contents: FileContents::OnDisk(src_file),
|
||||
});
|
||||
result.push(ArchiveFile {
|
||||
rel_path,
|
||||
rel_str,
|
||||
rel_path: PathBuf::from("Cargo.toml"),
|
||||
rel_str: "Cargo.toml".to_string(),
|
||||
contents: FileContents::Generated(GeneratedFile::Manifest),
|
||||
});
|
||||
}
|
||||
|
@ -3016,7 +3016,7 @@ See [..]
|
||||
[VERIFYING] foo v0.0.1 ([CWD])
|
||||
[COMPILING] foo v0.0.1 ([CWD][..])
|
||||
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
|
||||
[PACKAGED] 3 files, [..] ([..] compressed)
|
||||
[PACKAGED] 4 files, [..] ([..] compressed)
|
||||
",
|
||||
)
|
||||
.run();
|
||||
@ -3025,7 +3025,8 @@ See [..]
|
||||
.with_stdout(
|
||||
"\
|
||||
Cargo.lock
|
||||
cargo.toml
|
||||
Cargo.toml
|
||||
Cargo.toml.orig
|
||||
src/main.rs
|
||||
",
|
||||
)
|
||||
@ -3036,7 +3037,7 @@ src/main.rs
|
||||
validate_crate_contents(
|
||||
f,
|
||||
"foo-0.0.1.crate",
|
||||
&["Cargo.lock", "cargo.toml", "src/main.rs"],
|
||||
&["Cargo.lock", "Cargo.toml", "Cargo.toml.orig", "src/main.rs"],
|
||||
&[],
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user