pub repository
mirror.p-hatan.irwhich
0.1.3Like unix which(1). Check for and locate installed executables.
Readme
which pub package Build Status Coverage Status
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]);
}
Changelog
0.1.3
- Assume owner/group matches that of executable until it's possible to check. (#5)
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add whichpubspec.yaml
name: which
version: 0.1.3
author: Sean Eagan <seaneagan1@gmail.com>
description: Like unix which(1). Check for and locate installed executables.
homepage: https://github.com/seaneagan/which.dart
dependencies:
path: '>=1.3.1 <2.0.0'
when: '>=0.2.0 <0.3.0'
dev_dependencies:
mockito: '>=0.8.1 <0.9.0'
unittest: '>=0.11.4 <0.12.0'
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.1.0 | 2015-01-13T20:32:15.843440Z | Download | 2d6e7421b63798186ad06f2efa086843f69bfdd89d3526ea499002f88694cd9f |
| 0.1.1 | 2015-01-14T14:15:41.384700Z | Download | 1d827e022a5d7573da2c188a748bf2168afe3bd4e0f25fd3b97066bd4af93267 |
| 0.1.2 | 2015-01-15T21:53:40.454010Z | Download | 9619cbc780bfc1f79f0daf0ffdea6fa579c5640e031ddfe78751305d06a784ba |
| 0.1.3 | 2015-02-12T14:36:34.317160Z | Download | f39f0bf0a00254f8d9e031bad6aabb4ff02c7fb6e14e38cb1538320aa7f1bd34 |
Dependencies
path "\u003e=1.3.1 \u003c2.0.0"
when "\u003e=0.2.0 \u003c0.3.0"