File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -54,23 +54,23 @@ pub(super) fn expand_manifest(
54
54
}
55
55
cargo_util:: paths:: write_if_changed ( & hacked_path, hacked_source) ?;
56
56
57
- let manifest = expand_manifest_ ( & frontmatter, & hacked_path)
57
+ let manifest = inject_bin_path ( & frontmatter, & hacked_path)
58
58
. with_context ( || format ! ( "failed to parse manifest at `{}`" , path. display( ) ) ) ?;
59
59
let manifest = toml:: to_string_pretty ( & manifest) ?;
60
60
Ok ( manifest)
61
61
} else {
62
62
let frontmatter = "" ;
63
- let manifest = expand_manifest_ ( frontmatter, path)
63
+ let manifest = inject_bin_path ( frontmatter, path)
64
64
. with_context ( || format ! ( "failed to parse manifest at `{}`" , path. display( ) ) ) ?;
65
65
let manifest = toml:: to_string_pretty ( & manifest) ?;
66
66
Ok ( manifest)
67
67
}
68
68
}
69
69
70
- fn expand_manifest_ ( manifest : & str , path : & std:: path:: Path ) -> CargoResult < toml:: Table > {
70
+ /// HACK: Add a `[[bin]]` table to the `original_toml`
71
+ fn inject_bin_path ( manifest : & str , path : & std:: path:: Path ) -> CargoResult < toml:: Table > {
71
72
let mut manifest: toml:: Table = toml:: from_str ( & manifest) ?;
72
73
73
- // HACK: Using an absolute path while `hacked_path` is in use
74
74
let bin_path = path. to_string_lossy ( ) . into_owned ( ) ;
75
75
let file_stem = path
76
76
. file_stem ( )
You can’t perform that action at this time.
0 commit comments