1.1.1 • Published 3 years ago

@actions/exec v1.1.1

Weekly downloads
71,473
License
MIT
Repository
github
Last release
3 years ago

@actions/exec

Usage

Basic

You can use this package to execute tools in a cross platform way:

const exec = require('@actions/exec');

await exec.exec('node index.js');

Args

You can also pass in arg arrays:

const exec = require('@actions/exec');

await exec.exec('node', ['index.js', 'foo=bar']);

Output/options

Capture output or specify other options:

const exec = require('@actions/exec');

let myOutput = '';
let myError = '';

const options = {};
options.listeners = {
  stdout: (data: Buffer) => {
    myOutput += data.toString();
  },
  stderr: (data: Buffer) => {
    myError += data.toString();
  }
};
options.cwd = './lib';

await exec.exec('node', ['index.js', 'foo=bar'], options);

Exec tools not in the PATH

You can specify the full path for tools not in the PATH:

const exec = require('@actions/exec');

await exec.exec('"/path/to/my-tool"', ['arg1']);
github-actions-kit@airvzxf/cache@njmaeff/publish-devtodo-it-yourself@hediet/npm-template@crazymax/actions-toolkitgithub-pr-collector@everything-registry/sub-chunk-26synopsys-sig-nodetest-github_actions_testworkflow-status-slack-notificationrunmesetup-actsetup-atomsetup-nuget-exesetup-phpsample-action-1repo-visualizersupar-bit-releasestore-git-credential-github-actionstartgptcommittest-synopsys-sig-nodetheguruvisualize-reponpm-semantic-publish-actionupload_file_to_releasegithub-actions.cache-buildjetgithub-actions.cache-buildjet-patchedgithub-actions.cache-s3github-actions.warp-cachegithub-actions-s3-cachegitwzjavascript-actionjest-github-actionjest-coverage-comment-actioninquirer-pluginsinstall-swift-toolmicrosoft-security-devops-actions-toolkitmsca-actions-toolkithabitat-actiongh-action-netcoregithub-pages-deploy-actiongithub-script-actiongithub-checkoutgithub-version-actiongithub-fetch-workflow-artifactmomenticmd-hoppernode-package-release-actionpack-h5p-actionpackage-deployeropencommitpps-register-permissions-gh-actionpr-collectorpipx-install-actionnx-vercelmy-gadgetrynpm-semantic-publishnpm-installnpm-package-deployernpm-demo-shinsqlproj-analysis-clirsync-by-joesize-limit-demotool-cache-mirror@atom-ide-community/setup-atom@autoblocks/cli@akiojin/generate-mac-installer-github-action@akiojin/git-credential-manager-helper@akiojin/keychain@akiojin/p4-command@akiojin/setup-xocde-environment-github-action@akiojin/unity-bulid-github-action@alexkeating/nx-subgraph@bamboostick/git_release_notes@breeffy/actions-toolkit@busyxiang/react-hook-collection@chkimes/actions-cache@actions/cache@actions/core@actions/tool-cache@actions-for-rust/core@actions-kit/exec@boilerz/action-releaseunity-command-github-action@harveyr/github-actions-kit@hediet/json-to-dictionary@hediet/semver@hiberbee/github-actions@fluffy-spoon/action@google-github-actions/setup-cloud-sdk@gperdomor/nx-tools-core@gperdomor/nx-tools-nx-docker@eslint/github-action@khoazero123/actions-toolkit-cache@lui-design/coverage-report@martijnhols/actions-cache@njmaeff/publish-devto-lib@enescakir/cache@emtux/actions
1.1.1

3 years ago

1.1.0

4 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago