1
0
Fork 0

exec/README.md

pull/70/head
Jason Etcovitch 2019-08-21 01:18:00 -04:00
parent ea2ffbe002
commit 5e3e440c7f
1 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@
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 your tools on the command line in a cross platform way:
``` ```js
const exec = require('@actions/exec'); const exec = require('@actions/exec');
await exec.exec('node index.js'); await exec.exec('node index.js');
@ -16,7 +16,7 @@ await exec.exec('node index.js');
You can also pass in arg arrays: You can also pass in arg arrays:
``` ```js
const exec = require('@actions/exec'); const exec = require('@actions/exec');
await exec.exec('node', ['index.js', 'foo=bar']); await exec.exec('node', ['index.js', 'foo=bar']);
@ -26,7 +26,7 @@ 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): 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 exec = require('@actions/exec');
const myOutput = ''; const myOutput = '';
@ -50,7 +50,7 @@ await exec.exec('node', ['index.js', 'foo=bar'], options);
You can use it in conjunction with the `which` function from `@actions/io` to execute tools that are 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:
``` ```js
const exec = require('@actions/exec'); const exec = require('@actions/exec');
const io = require('@actions/io'); const io = require('@actions/io');