mirror of
https://github.com/deployphp/action.git
synced 2025-06-29 04:34:15 +00:00
Update deps
This commit is contained in:
parent
eed58e3496
commit
363bb1be96
126 changed files with 5743 additions and 2737 deletions
22
node_modules/which/README.md
generated
vendored
22
node_modules/which/README.md
generated
vendored
|
@ -9,30 +9,24 @@ needed when the PATH changes.
|
|||
## USAGE
|
||||
|
||||
```javascript
|
||||
var which = require('which')
|
||||
const which = require('which')
|
||||
|
||||
// async usage
|
||||
which('node', function (er, resolvedPath) {
|
||||
// er is returned if no "node" is found on the PATH
|
||||
// if it is found, then the absolute path to the exec is returned
|
||||
})
|
||||
// rejects if not found
|
||||
const resolved = await which('node')
|
||||
|
||||
// or promise
|
||||
which('node').then(resolvedPath => { ... }).catch(er => { ... not found ... })
|
||||
// if nothrow option is used, returns null if not found
|
||||
const resolvedOrNull = await which('node', { nothrow: true })
|
||||
|
||||
// sync usage
|
||||
// throws if not found
|
||||
var resolved = which.sync('node')
|
||||
const resolved = which.sync('node')
|
||||
|
||||
// if nothrow option is used, returns null if not found
|
||||
resolved = which.sync('node', {nothrow: true})
|
||||
const resolvedOrNull = which.sync('node', { nothrow: true })
|
||||
|
||||
// Pass options to override the PATH and PATHEXT environment vars.
|
||||
which('node', { path: someOtherPath }, function (er, resolved) {
|
||||
if (er)
|
||||
throw er
|
||||
console.log('found at %j', resolved)
|
||||
})
|
||||
await which('node', { path: someOtherPath, pathExt: somePathExt })
|
||||
```
|
||||
|
||||
## CLI USAGE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue