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 Oct 18, 2023
1 parent 299414b commit 3a50c8e
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 3a50c8e

Please sign in to comment.