mirror of
https://github.com/shimataro/ssh-key-action.git
synced 2025-06-19 22:52:10 +10:00
* first action! (#1)
This commit is contained in:
parent
8deacc95b1
commit
ace1e6a69a
3750 changed files with 1155519 additions and 0 deletions
58
node_modules/spawn-please/README.md
generated
vendored
Normal file
58
node_modules/spawn-please/README.md
generated
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
# spawn-please
|
||||
[](https://npmjs.org/package/spawn-please)
|
||||
|
||||
> Promisified child_process.spawn. \*Supports stdin* \*Rejects on stderr*
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save spawn-please
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
> `promise = spawn(command, [arguments], [stdin], [options])`
|
||||
|
||||
`options` are passed directly through to `child_process.spawn`.
|
||||
|
||||
```js
|
||||
const spawn = require('spawn-please')
|
||||
|
||||
spawn('printf', ['please?'])
|
||||
.then(output => {
|
||||
assert.equal(output, 'please?')
|
||||
})
|
||||
```
|
||||
|
||||
### How is this different than other child_process libraries?
|
||||
|
||||
- Allows you to pass a string to stdin:
|
||||
|
||||
```js
|
||||
spawn('cat', [], 'test')
|
||||
.then(output => {
|
||||
assert.equal(output, 'test')
|
||||
})
|
||||
|
||||
```
|
||||
- Rejects on any stderr:
|
||||
|
||||
```js
|
||||
spawn('some-command-with-stderr')
|
||||
.catch(stderr => {
|
||||
// do something with stderr
|
||||
})
|
||||
```
|
||||
|
||||
### Using your own Promise library
|
||||
|
||||
**spawn-please** uses the global Promise object by default. You may use your own Promise library by overriding the Promise property:
|
||||
|
||||
```js
|
||||
const spawn = require('spawn-please')
|
||||
spawn.Promise = require('bluebird')
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
ISC © [Raine Revere](https://github.com/raineorshine)
|
Loading…
Add table
Add a link
Reference in a new issue