commit | c702b3e137ad12a9ea1a010d0677f6388d2e87a6 | [log] [tgz] |
---|---|---|
author | Phil Quitslund <pq@users.noreply.github.com> | Fri May 22 13:38:27 2015 |
committer | Phil Quitslund <pq@users.noreply.github.com> | Fri May 22 13:38:27 2015 |
tree | 1dafd4fe3fd42465c7ba0886d52f49da2ed6a574 | |
parent | dc818770d5986feb1802d34b0bf8e45aba37e880 [diff] | |
parent | edc23a00c58fca064653c6d4f72c37be7d3b7d9f [diff] |
Merge pull request #12 from dart-lang/fixes (Pre)review tweaks.
Check for and locate installed executables. Just like unix which(1), except:
pub global activate den den install which
import 'dart:io'; import 'package:which/which.dart'; main(arguments) async { // Asynchronously var git = await which('git', orElse: () => null); // Or synchronously var git = whichSync('git', orElse: () => null); if (git == null) { print('Please install git and try again'); exit(1); } await Process.run(git, ['add', '-A']); await Process.run(git, ['commit', '-m', arguments.first]); }