(Pre)review tweaks. Based on the review of `when` a few pre-emptive strikes. Note that I kept true to the annotate non-private method signatures. (`_` prefixed methods don't need to declare returning `dynamic` for example. FWIW: it wouldn't bother me if they did...)
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]); }