Chromium Code Reviews| Index: sdk/lib/_internal/pub/lib/src/entrypoint.dart |
| diff --git a/sdk/lib/_internal/pub/lib/src/entrypoint.dart b/sdk/lib/_internal/pub/lib/src/entrypoint.dart |
| index 359c77b4823ebb735c72bb9f62374f97f1acc400..363f2b1248570045a6269ac8b013ee0ff92c8a94 100644 |
| --- a/sdk/lib/_internal/pub/lib/src/entrypoint.dart |
| +++ b/sdk/lib/_internal/pub/lib/src/entrypoint.dart |
| @@ -239,17 +239,20 @@ class Entrypoint { |
| // List all files that aren't gitignored, including those not checked |
| // in to Git. |
| return git.run(["ls-files", "--cached", "--others", |
| - "--exclude-standard", beneath]).then((files) { |
| + "--exclude-standard", beneath], |
| + workingDir: root.dir).then((files) { |
|
Bob Nystrom
2013/05/16 18:14:20
The indentation is a bit wonky here. How about:
r
nweiz
2013/05/16 18:40:03
Done.
|
| // Git always prints files relative to the project root, but we want |
| // them relative to the working directory. |
| return files.map((file) => path.join(root.dir, file)); |
| }); |
| } |
| - // Skip directories and broken symlinks. |
| - return listDir(beneath, recursive: true).where(fileExists); |
| + return listDir(beneath, recursive: true); |
| }).then((files) { |
| return files.where((file) { |
| + // Skip directories and broken symlinks. |
| + if (!fileExists(file)) return false; |
| + |
| var relative = path.relative(file, from: beneath); |
| if (_BLACKLISTED_FILES.contains(path.basename(relative))) return false; |
| return !path.split(relative).any(_BLACKLISTED_DIRS.contains); |