[Compiler] Version Fix for Window Builds

Closes https://github.com/dart-lang/sdk/issues/31745
Closes https://github.com/dart-lang/sdk/issues/32036

Closes https://github.com/dart-lang/sdk/pull/42906
https://github.com/dart-lang/sdk/pull/42906

GitOrigin-RevId: c1803a462ea83edd80766bc2f105a5698f856b34
Change-Id: I6bb2ee58d9cd482b1dda4b01fa5a9e2e423a5d21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156920
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
MichealReed 2020-08-06 18:17:12 +00:00 committed by commit-bot@chromium.org
parent e5af4c88e9
commit 1d6e6851b7

View file

@ -10,10 +10,9 @@ import 'dart:io';
import 'dart:async';
Future<String> getVersion(var rootPath) {
var suffix = Platform.operatingSystem == 'windows' ? '.exe' : '';
var printVersionScript = rootPath.resolve("tools/make_version.py");
return Process.run(
"python$suffix", [printVersionScript.toFilePath(), "--quiet"])
"python", [printVersionScript.toFilePath(), "--quiet"], runInShell:true)
.then((result) {
if (result.exitCode != 0) {
throw "Could not generate version";