# which **Repository Path**: mirrors_chromium_googlesource/which ## Basic Information - **Project Name**: which - **Description**: No description available - **Primary Language**: Unknown - **License**: BSD-3-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-19 - **Last Updated**: 2025-09-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README which [![pub package](http://img.shields.io/pub/v/which.svg)](https://pub.dartlang.org/packages/which) [![Build Status](https://travis-ci.org/dart-lang/which.svg?branch=master)](https://travis-ci.org/dart-lang/which) [![Coverage Status](https://coveralls.io/repos/dart-lang/which/badge.svg)](https://coveralls.io/r/dart-lang/which) ===== Check for and locate installed executables. Just like unix [which(1)][unix_which], except: * Doesn't shell out (fast). * Cross-platform (works on windows). ## Install ```shell pub global activate den den install which ``` ## Usage ```dart 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]); } ``` [unix_which]: http://en.wikipedia.org/wiki/Which_%28Unix%29