Created
July 12, 2013 23:45
-
-
Save nikgraf/5988677 to your computer and use it in GitHub Desktop.
A small script to start Dartium with type checks and asserts enabled on OSX. To run it you need the Dart editor and added the `dart` command to $PATH
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env dart | |
import 'dart:io'; | |
import 'dart:async'; | |
main() { | |
// find and run Dartium with type checks and asserts enabled | |
var whichDart = Process.run('which', ['dart']); | |
whichDart.then((command) { | |
var dartiumExecutable = new Path(command.stdout).join(new Path('../../../chromium/Chromium.app/Contents/MacOS/Chromium')); | |
var dartiumCommand = dartiumExecutable.toString(); | |
var environment = {'DART_FLAGS': '--enable-type-checks --enable-asserts'}; | |
var dartium = Process.start(dartiumCommand, [], environment: environment); | |
}) | |
.catchError((_) => print(_)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment