This commit is contained in:
eric sciple 2020-01-24 12:20:19 -05:00
parent beb1329f9f
commit 2b95e76931
7736 changed files with 1874747 additions and 51184 deletions

21
node_modules/@actions/exec/README.md generated vendored
View file

@ -4,9 +4,9 @@
#### Basic
You can use this package to execute your tools on the command line in a cross platform way:
You can use this package to execute tools in a cross platform way:
```
```js
const exec = require('@actions/exec');
await exec.exec('node index.js');
@ -16,7 +16,7 @@ await exec.exec('node index.js');
You can also pass in arg arrays:
```
```js
const exec = require('@actions/exec');
await exec.exec('node', ['index.js', 'foo=bar']);
@ -26,11 +26,11 @@ await exec.exec('node', ['index.js', 'foo=bar']);
Capture output or specify [other options](https://github.com/actions/toolkit/blob/d9347d4ab99fd507c0b9104b2cf79fb44fcc827d/packages/exec/src/interfaces.ts#L5):
```
```js
const exec = require('@actions/exec');
const myOutput = '';
const myError = '';
let myOutput = '';
let myError = '';
const options = {};
options.listeners = {
@ -48,13 +48,10 @@ await exec.exec('node', ['index.js', 'foo=bar'], options);
#### Exec tools not in the PATH
You can use it in conjunction with the `which` function from `@actions/io` to execute tools that are not in the PATH:
You can specify the full path for tools not in the PATH:
```
```js
const exec = require('@actions/exec');
const io = require('@actions/io');
const pythonPath: string = await io.which('python', true)
await exec.exec(`"${pythonPath}"`, ['main.py']);
await exec.exec('"/path/to/my-tool"', ['arg1']);
```