actions / actions/toolkit

Ability to exec process passing in environment variables

Open
#1,018 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
5.9k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

Describe the enhancement
Currently core allows a Github Action to exec a process, but there is no obvious way to pass environment variables to that process.

Code Snippet
Currently can do this:

await exec.exec(`command args`);

But need to do this:

await exec.exec(`command args`, env = {
  'ENV_VAR': 'value'
});

Additional information
N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the core exec entry point described in the issue and trace how the command is launched. Check the current exec API and its surrounding tests before deciding how environment variables should be supplied. Done means callers can pass an environment-variable mapping alongside the command and the launched process receives those values.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.