| OLD | NEW |
| (Empty) |
| 1 /** | |
| 2 * A shared library for finding the valu eof the --output-dir parameter | |
| 3 * which all of these programs use. | |
| 4 */ | |
| 5 library find_output_directory; | |
| 6 | |
| 7 const directiveName = '--output-dir='; | |
| 8 | |
| 9 _asString(list) => new String.fromCharCodes(list); | |
| 10 | |
| 11 findOutputDirectory(List<String> args) { | |
| 12 var directive = args.firstWhere( | |
| 13 (x) => x.contains(directiveName), | |
| 14 orElse: () => null); | |
| 15 if (directive == null) return '.'; | |
| 16 var file = directive.codeUnits.skip(directiveName.length); | |
| 17 return _asString(file); | |
| 18 } | |
| 19 | |
| OLD | NEW |