Skip to content

Commit

Permalink
Wrap sysroot path in double quotes as it might contain spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-opp committed Mar 25, 2018
1 parent e06560b commit 9320c42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl Rustflags {
pub fn for_xargo(&self, home: &Home) -> String {
let mut flags = self.flags.clone();
flags.push("--sysroot".to_owned());
flags.push(home.display().to_string());
flags.push(format!("\"{}\"", home.display()));
flags.join(" ")
}
}
Expand All @@ -68,7 +68,7 @@ impl Rustdocflags {
/// Stringifies these flags for Xargo consumption
pub fn for_xargo(mut self, home: &Home) -> String {
self.flags.push("--sysroot".to_owned());
self.flags.push(home.display().to_string());
self.flags.push(format!("\"{}\"", home.display()));
self.flags.join(" ")
}
}
Expand Down

0 comments on commit 9320c42

Please sign in to comment.