| OLD | NEW |
| 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 Loading... |
| 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
); |
| OLD | NEW |