Skip to content

Commit

Permalink
Fix failure to run executable targets on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
cerfical authored and tristan957 committed Jun 24, 2024
1 parent 9fd1b31 commit f59c628
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,10 @@ export async function genEnvFile(buildDir: string) {
// Load into a dict because vscode.ProcessExecution() does not support envFile.
_envDict = {};
const data = await fs.promises.readFile(envfile);
for (const i of data.toString().split(/\r?\n/)) {
for (const i of data
.toString()
.split(/\r?\n/)
.filter((i) => i)) {
// Poor man's i.split("=", 1), JS won't return part after first equal sign.
// Value is quoted, remove first and last " char and also possible \r ending.
const index = i.indexOf("=");
Expand Down

0 comments on commit f59c628

Please sign in to comment.