1.1.1 • Published 2 years ago

@actions/exec v1.1.1

Weekly downloads
71,473
License
MIT
Repository
github
Last release
2 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-26dependabot-backport-changelog-helpersetup-phpsetup-actsetup-atomsetup-nuget-exestore-git-credential-github-actionstartgptcommitdotnet-nuget-add-source-github-action@cypress/github-actionrunmersync-by-joesample-action-1sqlproj-analysis-clisize-limit-democache-extensionsbumpversionscached-docker-build-push@bamboostick/git_release_notes@autoblocks/clicloudbuild-task-github-actions@chkimes/actions-cachecommit-from-action@cpany/action@cpany/cli@busyxiang/react-hook-collectionchangesets-gitlabchangesets-gitlab-forkchangesets-with-bot@boilerz/action-release@breeffy/actions-toolkit@atom-ide-community/setup-atomconmitmoji@deuscx/issue-blog-action@docker/actions-toolkitcypress-test-results@dotcom-tool-kit/npmbalena-cisupar-bit-releaseeslint-suggestion-actionfirestore-document-type-partternsfirestore-document-type-patternsfirebase-rules-bundlertest-synopsys-sig-nodenpm-semantic-publish-actionalter-firestoreappcenter-distribute-github-actionazure-pipelines-webclientazure-pipelines-core-libbackport-github-actionazure-actions-webclientazure-actions-webclient-ahmelsayedazure-actions-webclient-testautomatic-versioningautoblockssynopsys-sig-nodetest-github_actions_testthegurufreshlinksfuckup-rubyinstall-swift-tooljavascript-actiontool-cache-mirrorgcs-cache-actiongithub-version-actiongithub-script-actiongithub-pages-deploy-actiongitwzgithub-fetch-workflow-artifactgithub-checkoutgithub-actions.cache-buildjetgithub-actions.cache-s3github-actions.warp-cachegh-action-netcoreget-github-releaseunity-command-github-actionupload_file_to_releasehabitat-actionjest-coverage-comment-actionjest-github-actionworkflow-status-slack-notificationvisualize-repo@gperdomor/nx-tools-core@gperdomor/nx-tools-nx-docker@google-github-actions/setup-cloud-sdk@martijnhols/actions-cache@hiberbee/github-actions@harveyr/github-actions-kit@iota/gh-tangle-release@khulnasoft/github-actionmomentic@jcroall/synopsys-sig-node@jamesives/github-pages-deploy-action
1.1.1

2 years ago

1.1.0

3 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago