From 019d6f84189364683a383a43e905655da80a6134 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Mon, 27 Jul 2015 16:56:18 -0700 Subject: [PATCH] Improve init.dart not to assume `dart` is in your PATH Instead, use Platform.executable, which is the path to the current `dart` executable. --- sky/sdk/bin/init.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sky/sdk/bin/init.dart b/sky/sdk/bin/init.dart index 7616fec98d3..85ec831d6e1 100644 --- a/sky/sdk/bin/init.dart +++ b/sky/sdk/bin/init.dart @@ -5,13 +5,12 @@ /* * This script should be invoked via 'pub run' after 'pub get': * $ pub run sky:init -* NOTE: The 'dart' executable must be on your $PATH for this script to work. */ import 'dart:io'; main(List arguments) { - ProcessResult result = Process.runSync('dart', ['-p', 'packages', 'packages/mojom/generate.dart']); + ProcessResult result = Process.runSync(Platform.executable, ['-p', 'packages', 'packages/mojom/generate.dart']); stdout.write(result.stdout); stderr.write(result.stderr); }