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

Unified Diff: packages/which/lib/src/which_impl.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 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 | « packages/which/lib/src/util.dart ('k') | packages/which/lib/which.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/which/lib/src/which_impl.dart
diff --git a/packages/which/lib/src/which_impl.dart b/packages/which/lib/src/which_impl.dart
deleted file mode 100755
index 2f492954ad67182b17af2cdc493eb15ecf443193..0000000000000000000000000000000000000000
--- a/packages/which/lib/src/which_impl.dart
+++ /dev/null
@@ -1,52 +0,0 @@
-
-library which.src.which_impl;
-
-import 'dart:async';
-
-import 'package:when/when.dart';
-
-import 'util.dart';
-
-Future<String> which(
- String command,
- Iterable<String> candidatePaths,
- bool isWindows,
- Future<bool> isExecutable(String path, bool isWindows),
- orElse()) => new Future(() => _which(
- command,
- candidatePaths,
- isWindows,
- isExecutable,
- orElse,
- toSequence: (items) => new Stream.fromIterable(items)));
-
-String whichSync(
- String command,
- Iterable<String> candidatePaths,
- bool isWindows,
- bool isExecutable(String path, bool isWindows),
- orElse()) => _which(
- command,
- candidatePaths,
- isWindows,
- isExecutable,
- orElse);
-
-_which(
- String command,
- Iterable<String> candidatePaths,
- bool isWindows,
- isExecutable(String path, bool isWindows),
- orElse(),
- {toSequence(Iterable items): identity}) => when(
- () => firstWhere(
- toSequence(candidatePaths),
- (path) => isExecutable(path, isWindows),
- orElse: orElse != null ? orElse : () => _commandNotFound(command, null)),
- onError: (e) => _commandNotFound(command, e));
-
-_commandNotFound(String command, e) {
- var message = 'Command not found: $command';
- if (e != null) message += '\n$e';
- throw new StateError(message);
-}
« no previous file with comments | « packages/which/lib/src/util.dart ('k') | packages/which/lib/which.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698