Index: utils/pub/command_lish.dart |
diff --git a/utils/pub/command_lish.dart b/utils/pub/command_lish.dart |
index 81d896a956ec32da939736b6c99685efebe33688..10a06840c30c646af279a2163f74be92f15f7685 100644 |
--- a/utils/pub/command_lish.dart |
+++ b/utils/pub/command_lish.dart |
@@ -116,11 +116,8 @@ class LishCommand extends PubCommand { |
Future<List<String>> get _filesToPublish { |
var rootDir = entrypoint.root.dir; |
- return Future.wait([ |
- dirExists(join(rootDir, '.git')), |
- git.isInstalled |
- ]).then((results) { |
- if (results[0] && results[1]) { |
+ return git.isInstalled.then((results) { |
nweiz
2013/02/01 02:05:55
"results" -> "gitInstalled"
It's worrisome that t
Bob Nystrom
2013/02/01 23:17:21
It did. :( pub_lish_test is flaky so you don't see
|
+ if (dirExists(join(rootDir, '.git')) && gitInstalled) { |
// List all files that aren't gitignored, including those not checked |
// in to Git. |
return git.run(["ls-files", "--cached", "--others", |
@@ -129,17 +126,15 @@ class LishCommand extends PubCommand { |
return listDir(rootDir, recursive: true).then((entries) { |
return Future.wait(entries.map((entry) { |
- return fileExists(entry).then((isFile) { |
// Skip directories. |
- if (!isFile) return null; |
- |
- // TODO(rnystrom): Making these relative will break archive |
- // creation if the cwd is ever *not* the package root directory. |
- // Should instead only make these relative right before generating |
- // the tree display (which is what really needs them to be). |
- // Make it relative to the package root. |
- return relativeTo(entry, rootDir); |
- }); |
+ if (!fileExists(entry)) return null; |
+ |
+ // TODO(rnystrom): Making these relative will break archive |
+ // creation if the cwd is ever *not* the package root directory. |
+ // Should instead only make these relative right before generating |
+ // the tree display (which is what really needs them to be). |
+ // Make it relative to the package root. |
+ return relativeTo(entry, rootDir); |
})); |
}); |
}).then((files) => files.where((file) { |