Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Unified Diff: lib/src/command_runner.dart

Issue 1246713005: Fix a Debian build error. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/command_runner.dart
diff --git a/lib/src/command_runner.dart b/lib/src/command_runner.dart
index 80815f4fb6c1ab3a3cc78d8ba08c7204464e298b..bc736e805b35e49282f1414ab290339f7c777ea1 100644
--- a/lib/src/command_runner.dart
+++ b/lib/src/command_runner.dart
@@ -160,6 +160,7 @@ and include the results in a bug report on http://dartbug.com/new.
/// This is otherwise hard to tell, and can produce confusing behavior issues.
void _checkDepsSynced() {
if (!runningFromDartRepo) return;
+ if (!git.isInstalled) return;
var deps = readTextFile(p.join(dartRepoRoot, 'DEPS'));
var pubRevRegExp = new RegExp(
@@ -168,8 +169,14 @@ and include the results in a bug report on http://dartbug.com/new.
if (match == null) return;
var depsRev = match[1];
- var actualRev = git.runSync(["rev-parse", "HEAD"], workingDir: pubRoot)
- .single;
+ var actualRev;
+ try {
+ actualRev = git.runSync(["rev-parse", "HEAD"], workingDir: pubRoot)
+ .single;
+ } on git.GitException catch (_) {
+ // When building for Debian, pub isn't checked out via git.
+ return;
+ }
if (depsRev == actualRev) return;
log.warning(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698