File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Original file line number Diff line number Diff line change 1
1
# Unreleased
2
2
3
+ - Fix nightly breakage of doctests in workspaces ([ #69 ] ( https://github.com/rust-osdev/bootimage/pull/69 ) )
4
+
3
5
# 0.10.1 – 2020-08-03
4
6
5
7
- Parse ` --version ` argument without subcommand (` bootimage --version ` ) ([ #67 ] ( https://github.com/rust-osdev/bootimage/pull/67 ) )
Original file line number Diff line number Diff line change @@ -26,7 +26,18 @@ impl Builder {
26
26
///
27
27
/// If None is passed for `manifest_path`, it is automatically searched.
28
28
pub fn new ( manifest_path : Option < PathBuf > ) -> Result < Self , BuilderError > {
29
- let manifest_path = manifest_path. unwrap_or ( locate_cargo_manifest:: locate_manifest ( ) ?) ;
29
+ let manifest_path = match manifest_path. or_else ( || {
30
+ std:: env:: var ( "CARGO_MANIFEST_DIR" )
31
+ . ok ( )
32
+ . map ( |dir| Path :: new ( & dir) . join ( "Cargo.toml" ) )
33
+ } ) {
34
+ Some ( path) => path,
35
+ None => {
36
+ println ! ( "WARNING: `CARGO_MANIFEST_DIR` env variable not set" ) ;
37
+ locate_cargo_manifest:: locate_manifest ( ) ?
38
+ }
39
+ } ;
40
+
30
41
Ok ( Builder {
31
42
manifest_path,
32
43
project_metadata : None ,
You can’t perform that action at this time.
0 commit comments