actions / actions/toolkit

exec.exec fails to interpolate environment variables

Open
#1,058 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

exec.exec fails to interpolate environment variable

Describe the bug

/usr/bin/echo $MYVAR
$MYVAR

To Reproduce

const options = {
    env: {
        MYVAR: 'abc'
    }
};

await exec.exec('echo', ['$MYVAR'], options);

Expected behavior

/usr/bin/echo abc
abc

Additional context
Add any other context about the problem here.

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 by tracing the TypeScript implementation of exec.exec using the JavaScript reproduction and its env option. Confirm the current output for echo with $MYVAR, then verify that the completed behavior passes the expected abc output shown in the issue.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.