Skip to content

Commit

Permalink
Merge pull request #277 from justinlampley/SpaceInUsername
Browse files Browse the repository at this point in the history
Handle space in Platform IO executable path when using shell
  • Loading branch information
jurgelenas authored Feb 13, 2022
2 parents cd39f9b + cb52c6c commit 97db3f3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/api/src/library/Platformio/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,15 @@ export default class Platformio {
});
}

// eslint-disable-next-line @typescript-eslint/naming-convention
let { platformio_exe } = state;
// if using shell, surround exe in quotes in case path has a space in it
if (options.shell) {
platformio_exe = `"${platformio_exe}"`;
}

return new Commander().runCommand(
state.platformio_exe,
platformio_exe,
[...args],
options,
onOutput
Expand Down

0 comments on commit 97db3f3

Please sign in to comment.