You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
![]() |
3 years ago | |
---|---|---|
lib | 3 years ago | |
test | 3 years ago | |
tool | 3 years ago | |
.gitignore | 3 years ago | |
.travis.yml | 3 years ago | |
AUTHORS | 3 years ago | |
CHANGELOG.md | 3 years ago | |
CONTRIBUTING.md | 3 years ago | |
LICENSE | 3 years ago | |
README.md | 3 years ago | |
pubspec.yaml | 3 years ago |
README.md
which

Check for and locate installed executables. Just like unix which(1), except:
- Doesn't shell out (fast).
- Cross-platform (works on windows).
Install
pub global activate den
den install which
Usage
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]);
}