File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,8 @@ fn build_ar_list(
229
229
) -> CargoResult < Vec < ArchiveFile > > {
230
230
let mut result = Vec :: new ( ) ;
231
231
let root = pkg. root ( ) ;
232
+
233
+ let mut manifest_found = false ;
232
234
for src_file in src_files {
233
235
let rel_path = src_file. strip_prefix ( & root) ?. to_path_buf ( ) ;
234
236
check_filename ( & rel_path, & mut ws. config ( ) . shell ( ) ) ?;
@@ -242,6 +244,7 @@ fn build_ar_list(
242
244
"Cargo.toml" |
243
245
// normalize for case insensitive filesystems (like on Windows)
244
246
"cargo.toml" => {
247
+ manifest_found = true ;
245
248
result. push ( ArchiveFile {
246
249
rel_path : PathBuf :: from ( ORIGINAL_MANIFEST_FILE ) ,
247
250
rel_str : ORIGINAL_MANIFEST_FILE . to_string ( ) ,
@@ -267,6 +270,13 @@ fn build_ar_list(
267
270
}
268
271
}
269
272
}
273
+ if !manifest_found {
274
+ ws. config ( ) . shell ( ) . warn ( & format ! (
275
+ "no `Cargo.toml` file found when packaging `{}` (note the case of the file name)." ,
276
+ pkg. name( )
277
+ ) ) ?;
278
+ }
279
+
270
280
if pkg. include_lockfile ( ) {
271
281
result. push ( ArchiveFile {
272
282
rel_path : PathBuf :: from ( "Cargo.lock" ) ,
Original file line number Diff line number Diff line change @@ -3069,6 +3069,7 @@ fn no_manifest_found() {
3069
3069
"\
3070
3070
[WARNING] manifest has no documentation[..]
3071
3071
See [..]
3072
+ [WARNING] no `Cargo.toml` file found when packaging `foo` (note the case of the file name).
3072
3073
[PACKAGING] foo v0.0.1 ([CWD])
3073
3074
[VERIFYING] foo v0.0.1 ([CWD])
3074
3075
[COMPILING] foo v0.0.1 ([CWD][..])
You can’t perform that action at this time.
0 commit comments