Index: runtime/bin/vmservice/client/build.dart |
diff --git a/runtime/bin/vmservice/client/build.dart b/runtime/bin/vmservice/client/build.dart |
index 71faf8b6dc5c99667d354ea22048037e44ccb8b3..627da4e2868ea8fde873ff9d8d18e2ed280dc784 100644 |
--- a/runtime/bin/vmservice/client/build.dart |
+++ b/runtime/bin/vmservice/client/build.dart |
@@ -13,9 +13,12 @@ main() { |
compileToJs(_) { |
print("Running dart2js"); |
- var dart_path = Platform.executable; |
- var bin_path = dart_path.substring(0, dart_path.lastIndexOf(Platform.pathSeparator)); |
- var dart2js_path = "$bin_path${Platform.pathSeparator}dart2js"; |
+ var dart_path = Platform.executable; |
+ var dart2js_path = 'dart2js'; |
+ if (dart_path.lastIndexOf(Platform.pathSeparator) != -1) { |
+ var bin_path = dart_path.substring(0, dart_path.lastIndexOf(Platform.pathSeparator)); |
+ dart2js_path = "$bin_path${Platform.pathSeparator}dart2js"; |
+ } |
var result = |
Process.runSync(dart2js_path, |
[ '--minify', '-o', 'out/web/index.html_bootstrap.dart.js', |