Skip to content

Commit

Permalink
fix default Env value to have explicit default EDITOR=undefined set
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Sep 29, 2023
1 parent 5677f58 commit 3376769
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ type Env = {
* this tool needs to access, whether their values are defined or not.
*/
export function getEnvironmentVariables(): Env {
return ['EDITOR'].reduce((object, key) => {
return { ...object, [key]: process.env[key] };
}, {} as Env);
return ['EDITOR'].reduce(
(object, key) => {
return { ...object, [key]: process.env[key] };
},
{
EDITOR: undefined,
},
);
}

0 comments on commit 3376769

Please sign in to comment.