| commit | 21c842f19a2631416b6c829c89bb746c7fdc9bbc | [log] [tgz] |
|---|---|---|
| author | Sean Eagan <[email protected]> | Thu Feb 12 14:24:54 2015 |
| committer | Sean Eagan <[email protected]> | Thu Feb 12 14:24:54 2015 |
| tree | 11bd81ee330b3a0a925fb1d5ca816c31395f2ebf | |
| parent | 5b06d95b632157480f12d1d03566c97582b6220a [diff] |
Fix #5
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]); }