File tree 1 file changed +14
-7
lines changed
1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -96,12 +96,16 @@ pub fn split_input(
96
96
info ! ( "part_mani: {:?}" , part_mani) ;
97
97
info ! ( "source: {:?}" , source) ;
98
98
99
- let source_path_str = source_path
100
- . to_str ( )
101
- . ok_or_else ( || format ! ( "Unable to stringify {source_path:?}" ) ) ?;
99
+ let source_path_from_package = if template. is_some ( ) {
100
+ script_name
101
+ } else {
102
+ source_path
103
+ . to_str ( )
104
+ . ok_or_else ( || format ! ( "Unable to stringify {source_path:?}" ) ) ?
105
+ } ;
102
106
103
107
// It's-a mergin' time!
104
- let def_mani = default_manifest ( input, bin_name, source_path_str , toolchain) ;
108
+ let def_mani = default_manifest ( input, bin_name, source_path_from_package , toolchain) ;
105
109
let dep_mani = deps_manifest ( deps) ?;
106
110
107
111
let mani = merge_manifest ( def_mani, part_mani) ?;
@@ -411,7 +415,7 @@ println!("Hello")"#)),
411
415
"{}{}" ,
412
416
r#"[[bin]]
413
417
name = "binary-name"
414
- path = "/package/ main.rs"
418
+ path = "main.rs"
415
419
416
420
[dependencies]
417
421
@@ -423,12 +427,15 @@ version = "0.1.0""#,
423
427
STRIP_SECTION
424
428
) ,
425
429
"/package/main.rs" ,
426
- Some ( r#"
430
+ Some (
431
+ r#"
427
432
fn main() -> Result<(), Box<dyn std::error::Error+Sync+Send>> {
428
433
{println!("Hello")}
429
434
Ok(())
430
435
}
431
- "# . to_string( ) )
436
+ "#
437
+ . to_string( )
438
+ )
432
439
)
433
440
) ;
434
441
}
You can’t perform that action at this time.
0 commit comments