Skip to content

Repository files navigation

find-exec

Downloads

Takes a list of shell commands and returns the first available. Works synchronously to respect the order.

Returns null if none of the listed commands were found.

Examples

$ which mplayer
which: no mplayer
$ which afplay
/usr/bin/afplay
varcommand=require('find-exec')(["mplayer","afplay","cvlc"])console.log(command)// afplay
varcommand=require('find-exec')(["mplayer"])console.log(command)// null

Installation

npm install find-exec

License

MIT

About

Takes a list of shell commands and returns the first available.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages