Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Cargo to fix nightly channel #40450

Merged
merged 1 commit into from
Mar 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ matrix:
SRC=.
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache
RUST_LOG=sccache=debug
os: osx
osx_image: xcode8.2
install: &osx_install_sccache >
Expand All @@ -59,7 +59,7 @@ matrix:
SRC=.
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache
RUST_LOG=sccache=debug
os: osx
osx_image: xcode8.2
install: *osx_install_sccache
Expand All @@ -71,7 +71,7 @@ matrix:
DEPLOY=1
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache
RUST_LOG=sccache=debug
os: osx
osx_image: xcode8.2
install: >
Expand All @@ -84,7 +84,7 @@ matrix:
DEPLOY=1
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache
RUST_LOG=sccache=debug
os: osx
osx_image: xcode8.2
install: *osx_install_sccache
Expand All @@ -101,7 +101,7 @@ matrix:
DEPLOY_ALT=1
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache
RUST_LOG=sccache=debug
os: osx
osx_image: xcode8.2
install: *osx_install_sccache
Expand Down
2 changes: 1 addition & 1 deletion cargo
15 changes: 14 additions & 1 deletion src/bootstrap/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,22 @@ struct Info {

impl GitInfo {
pub fn new(dir: &Path) -> GitInfo {
if !dir.join(".git").is_dir() {
// See if this even begins to look like a git dir
if !dir.join(".git").exists() {
return GitInfo { inner: None }
}

// Make sure git commands work
let out = Command::new("git")
.arg("rev-parse")
.current_dir(dir)
.output()
.expect("failed to spawn git");
if !out.status.success() {
return GitInfo { inner: None }
}

// Ok, let's scrape some info
let ver_date = output(Command::new("git").current_dir(dir)
.arg("log").arg("-1")
.arg("--date=short")
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ impl Build {
None => false,
};
let rust_info = channel::GitInfo::new(&src);
let cargo_info = channel::GitInfo::new(&src.join("src/tools/cargo"));
let cargo_info = channel::GitInfo::new(&src.join("cargo"));

Build {
flags: flags,
Expand Down