Skip to content

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

License

Notifications You must be signed in to change notification settings

shime/find-exec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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
var command = require('find-exec')(["mplayer", "afplay", "cvlc"])
console.log(command) // afplay
var command = 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

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •