Skip to content

Commit

Permalink
chore(desktop): ignore environment variables with spaces in names (#1859
Browse files Browse the repository at this point in the history
)
  • Loading branch information
hyrious authored Mar 9, 2023
1 parent 607b162 commit f4c4370
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion desktop/main-app/scripts/esbuild/plugin/dotEnvFlowPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ function parseWithEnvObject(orgEnv: Record<string, string | undefined>): Record<
return Reflect.ownKeys(orgEnv)
?.map(item => {
const result: Record<string, any> = {};
if (typeof item === "string" && orgEnv?.[item] && !item.includes("(")) {
if (
typeof item === "string" &&
orgEnv?.[item] &&
!item.includes("(") &&
!item.includes(" ")
) {
result[`process.env.${item}`] = JSON.stringify(orgEnv?.[item]);
}
return result;
Expand Down

0 comments on commit f4c4370

Please sign in to comment.