From 77a6988dd34e363286c6bd69b34d882839ff0494 Mon Sep 17 00:00:00 2001 From: Amaury Hernandez-Aguila Date: Fri, 26 Aug 2022 04:11:18 -0700 Subject: [PATCH] Possible solution to refreshing env vars on Win. --- src/dashboard/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dashboard/index.ts b/src/dashboard/index.ts index 56a38c3..eb05cdc 100644 --- a/src/dashboard/index.ts +++ b/src/dashboard/index.ts @@ -206,7 +206,9 @@ export default async function () { } else { cmd = `echo '\nexport PATH=$PATH:${binPath}' >> ${getInitFilePath()}`; } - exec(cmd); + exec(cmd, () => { + if (plat === 'win') exec('set PATH=C'); + }); window?.webContents.send(DashboardChannelsEnum.set_point_path); };