Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 495a2c1

Browse filesBrowse files
authored
Merge pull request #69 from rust-osdev/fix-doctests
Fix nightly breakage of doctests in workspaces
2 parents 0a5fa3d + ba94e67 commit 495a2c1
Copy full SHA for 495a2c1

File tree

Expand file treeCollapse file tree

2 files changed

+14
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+14
-1
lines changed

‎Changelog.md

Copy file name to clipboardExpand all lines: Changelog.md
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Unreleased
22

3+
- Fix nightly breakage of doctests in workspaces ([#69](https://github.com/rust-osdev/bootimage/pull/69))
4+
35
# 0.10.1 – 2020-08-03
46

57
- Parse `--version` argument without subcommand (`bootimage --version`) ([#67](https://github.com/rust-osdev/bootimage/pull/67))

‎src/builder/mod.rs

Copy file name to clipboardExpand all lines: src/builder/mod.rs
+12-1Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,18 @@ impl Builder {
2626
///
2727
/// If None is passed for `manifest_path`, it is automatically searched.
2828
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+
3041
Ok(Builder {
3142
manifest_path,
3243
project_metadata: None,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.