Support unsetting of environment variables in core
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the enhancement
Within pkg/core/src/core.ts, I would like the ability to unset environment variables. Today there is a exportVariable function, but I would like an additional unsetVariable function to be added. This would allow one to remove the variable from the running environment. One can simply blank the variable - but have the ability to completely remove it would be nice.
Code Snippet
JSON.parse(myEnvVariables).forEach((env: string) => {
core.unsetVariable(env);
});
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 in pkg/core/src/core.ts and compare the requested unsetVariable function with the existing exportVariable function. Confirm how environment variables are currently changed, then implement removal of a variable from the running environment; done means callers can use the shown loop to completely unset each variable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100