Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix default Env value to have explicit default EDITOR=undefined set
  • Loading branch information
legobeat committed Oct 13, 2023
commit 3dc282c493e3a3a897478db5eb24fc3cd69896bb
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,
},
);
}