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

Side by Side Diff: packages/which/lib/src/candidate_paths.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « packages/which/drone.sh ('k') | packages/which/lib/src/has_permission.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 library which.src.candidate_paths; 2 library which.src.candidate_paths;
3 3
4 import 'dart:io'; 4 import 'dart:io';
5 5
6 import 'package:path/path.dart'; 6 import 'package:path/path.dart';
7 7
8 Iterable<String> getCandidatePaths(String command, Map<String, String> environme nt, bool isWindows, Context context) { 8 Iterable<String> getCandidatePaths(String command, Map<String, String> environme nt, bool isWindows, Context context) {
9 if (context.isAbsolute(command)) return [command]; 9 if (context.isAbsolute(command)) return [command];
10 10
(...skipping 16 matching lines...) Expand all
27 27
28 pathEnv.insert(0, context.current); 28 pathEnv.insert(0, context.current);
29 var pathExt = splitEnvVar('PATHEXT', ".EXE"); 29 var pathExt = splitEnvVar('PATHEXT', ".EXE");
30 if (command.contains('.')) pathExt.insert(0, ''); 30 if (command.contains('.')) pathExt.insert(0, '');
31 return noExtPaths.expand((commandPath) => 31 return noExtPaths.expand((commandPath) =>
32 pathExt.map((pathExtEntry) => commandPath + pathExtEntry)); 32 pathExt.map((pathExtEntry) => commandPath + pathExtEntry));
33 } 33 }
34 34
35 Iterable<String> getRealCandidatePaths(String command) => 35 Iterable<String> getRealCandidatePaths(String command) =>
36 getCandidatePaths(command, Platform.environment, Platform.isWindows, context ); 36 getCandidatePaths(command, Platform.environment, Platform.isWindows, context );
OLDNEW
« no previous file with comments | « packages/which/drone.sh ('k') | packages/which/lib/src/has_permission.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698