exec.exec fails to interpolate environment variables
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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