mirror of
https://github.com/flutter/flutter
synced 2024-10-13 19:52:53 +00:00
Improve init.dart not to assume dart
is in your PATH
Instead, use Platform.executable, which is the path to the current `dart` executable.
This commit is contained in:
parent
09cfb05908
commit
be52cb8690
|
@ -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<String> 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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue