OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 library fletchc.src.guess_configuration; | 5 library fletchc.src.guess_configuration; |
6 | 6 |
7 import 'dart:io' show | 7 import 'dart:io' show |
8 File, | 8 File, |
9 Link, | 9 Link, |
10 Platform, | 10 Platform, |
11 Process; | 11 Process; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 _cachedFletchVersion = const String.fromEnvironment('fletch.version'); | 56 _cachedFletchVersion = const String.fromEnvironment('fletch.version'); |
57 if (_cachedFletchVersion != null) return _cachedFletchVersion; | 57 if (_cachedFletchVersion != null) return _cachedFletchVersion; |
58 Uri fletchVm = guessFletchVm(null, mustExist: false); | 58 Uri fletchVm = guessFletchVm(null, mustExist: false); |
59 if (fletchVm != null) { | 59 if (fletchVm != null) { |
60 String vmPath = fletchVm.toFilePath(); | 60 String vmPath = fletchVm.toFilePath(); |
61 return _cachedFletchVersion = | 61 return _cachedFletchVersion = |
62 Process.runSync(vmPath, <String>["--version"]).stdout.trim(); | 62 Process.runSync(vmPath, <String>["--version"]).stdout.trim(); |
63 } | 63 } |
64 return _cachedFletchVersion = "version information not available"; | 64 return _cachedFletchVersion = "version information not available"; |
65 } | 65 } |
OLD | NEW |