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 {
393
393
. url
394
394
. to_file_path ( )
395
395
. expect ( "path sources cannot be remote" ) ;
396
+ if crate :: util:: toml:: is_embedded ( & path) {
397
+ anyhow:: bail!( "The embedded script cannot be used as a dependency" ) ;
398
+ }
396
399
Ok ( Box :: new ( PathSource :: new ( & path, self , gctx) ) )
397
400
}
398
401
SourceKind :: Registry | SourceKind :: SparseRegistry => Ok ( Box :: new (
Original file line number Diff line number Diff line change @@ -1402,10 +1402,7 @@ Caused by:
1402
1402
Unable to update [ROOT]/foo/script.rs
1403
1403
1404
1404
Caused by:
1405
- failed to read `[ROOT]/foo/script.rs/Cargo.toml`
1406
-
1407
- Caused by:
1408
- Not a directory (os error 20)
1405
+ The embedded script cannot be used as a dependency
1409
1406
1410
1407
"# ] ] )
1411
1408
. run ( ) ;
You can’t perform that action at this time.
0 commit comments