mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #3398] [feature]: Add env variable unset #1137
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1137
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rabbittsoup on GitHub (Sep 27, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3398
Is there an existing issue for this?
Summary
I’d like to be able to unset environment variables to help cleanup unused variables in scripts.
pw.env.set(var, null)
or
pw.env.unset(var)
or similar
Why should this be worked on?
In some tests, I create a lot of env variables, and these can make the environment variables difficult to maintain manually. An unset capability allows the script to clean up after itself.
@liyasthomas commented on GitHub (Sep 29, 2023):
If you want to set an empty string as the environment value, you could use the following script;
Let me know if this is what you're asking.
@rabbittsoup commented on GitHub (Sep 29, 2023):
No. I want to delete the variable from the environment entirely.
@rabbittsoup commented on GitHub (Dec 14, 2023):
Is there anything new I can add to help this request move forward?
@ajmalmohad commented on GitHub (Dec 15, 2023):
I have raised a PR including this feature in the js-sandbox, which'll work in pre-request and test scripts
@rabbittsoup commented on GitHub (Dec 15, 2023):
Thank you
@liyasthomas commented on GitHub (Feb 2, 2024):
Thanks for your patience and valuable feedback. This feature has been implemented in the latest release.
Closing this ticket as this feature is now available in the recent version. Feel free to reach out if you encounter any further concerns.
@rabbittsoup commented on GitHub (Feb 3, 2024):
Verified in the wild. Works great! Thank you!