File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,12 @@ exports.setEnv = function (var_) {
5454 } ;
5555} ;
5656
57+ exports . unsetEnv = function ( var_ ) {
58+ return function ( ) {
59+ delete process . env [ var_ ] ;
60+ } ;
61+ } ;
62+
5763exports . exit = function ( code ) {
5864 return function ( ) {
5965 process . exit ( code ) ;
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ module Node.Process
1313 , getEnv
1414 , lookupEnv
1515 , setEnv
16+ , unsetEnv
1617 , pid
1718 , platform
1819 , exit
@@ -119,6 +120,10 @@ lookupEnv k = FO.lookup k <$> getEnv
119120-- | Set an environment variable.
120121foreign import setEnv :: String -> String -> Effect Unit
121122
123+ -- | Delete an environment variable.
124+ -- | Use case: to hide secret environment variable from child processes.
125+ foreign import unsetEnv :: String -> Effect Unit
126+
122127pid :: Pid
123128pid = process.pid
124129
You can’t perform that action at this time.
0 commit comments