1.1.1 • Published 4 years ago

@actions/exec v1.1.1

Weekly downloads
71,473
License
MIT
Repository
github
Last release
4 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-notificationsupar-bit-releasestore-git-credential-github-actionstartgptcommittest-synopsys-sig-nodetheguruvisualize-repojest-coverage-comment-actionjest-github-actionk8s-deploy-actioninstall-swift-tooljavascript-actionhabitat-actioninquirer-pluginslinks-updatermd-hopper@weslleyrocha/changesets-gitlab@woksin/github-actions.shared.git@whatskit/tag-push-action@xeel-dev/cli@xeel-dev/cli-docker-plugin@xeel-dev/cli-npm-plugin@xeel-dev/cli-python-plugin@wreckingball/opencommit@ubicloud/cache@tonyhallett/github-actions@thewtex/setup-micromamba@tinybudgie/schematics@tradeshift/actions-exec@testtttttt/test1@vanducvo/cache@useblacksmith/cache@urcomputeringpal/github-script-ts@zh5/opencommit@tematools/schematics@terradatum/auto-actionaction-full-scanaction-baseline-scanaction-setup-bunaction-notificationsaction-setup-condaactions-output-wrapperactions-toolkitactions-common-scansactions-exec-wrapperactions-github-pagesactions-js-toolkitactionnetcorealter-firestoreazure-actions-webclientazure-actions-webclient-ahmelsayedazure-actions-webclient-testautoblocksazure-pipelines-webclientazure-pipelines-core-libappcenter-distribute-github-actionbackport-github-action@octopusdeploy/step-package-cli@octorelease/core@octorelease/git@octorelease/lerna@octorelease/npm@octorelease/prune-shrinkwrap@octorelease/sample-plugin@nx-extensions/core@nx-tools/core@nx-tools/docker-meta@openzeppelin/relayer-sdk@ones-design/coverage-report@njmaeff/publish-devto-lib@peter-evans/actions-git@peergrade/actions-common-scansget-github-releasefuckup-rubyfreshlinksgcs-cache-action@shelfjs/schematics@sula/create-release@stackfort/iac-cicd@swlynch99/actions-cache-gcs@teamhive/core-actions@teamhive/core-actions-common@teamhive/core-cli@teaminkling/autolibeslint-suggestion-actionfirebase-rules-bundlerfirestore-document-type-partternsfirestore-document-type-patterns@actions/tool-cache@actions-for-rust/core
1.1.1

4 years ago

1.1.0

4 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago