File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -393,6 +393,9 @@ impl SourceId {
393393 . url
394394 . to_file_path ( )
395395 . expect ( "path sources cannot be remote" ) ;
396+ if crate :: util:: toml:: is_embedded ( & path) {
397+ anyhow:: bail!( "Single file packages cannot be used as dependencies" )
398+ }
396399 Ok ( Box :: new ( PathSource :: new ( & path, self , gctx) ) )
397400 }
398401 SourceKind :: Registry | SourceKind :: SparseRegistry => Ok ( Box :: new (
Original file line number Diff line number Diff line change @@ -1402,10 +1402,7 @@ Caused by:
14021402 Unable to update [ROOT]/foo/script.rs
14031403
14041404Caused by:
1405- failed to read `[ROOT]/foo/script.rs/Cargo.toml`
1406-
1407- Caused by:
1408- Not a directory (os error 20)
1405+ Single file packages cannot be used as dependencies
14091406
14101407"# ] ] )
14111408 . run ( ) ;
You can’t perform that action at this time.
0 commit comments