Skip to content

Commit 61d8e3f

Browse files
committed
Separate args to avoid spaces issues
1 parent e799472 commit 61d8e3f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/hlsBinaries.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ async function getProjectGhcVersion(
115115
},
116116
async (progress, token) => {
117117
return new Promise<string>((resolve, reject) => {
118-
const command: string = wrapper + ' --project-ghc-version';
118+
const args = ['--project-ghc-version'];
119+
const command: string = wrapper + args.join(' ');
119120
logger.info(`Executing '${command}' in cwd '${dir}' to get the project or file ghc version`);
120121
token.onCancellationRequested(() => {
121122
logger.warn(`User canceled the execution of '${command}'`);
@@ -124,7 +125,8 @@ async function getProjectGhcVersion(
124125
// We execute the command in a shell for windows, to allow use .cmd or .bat scripts
125126
const childProcess = child_process
126127
.execFile(
127-
command,
128+
wrapper,
129+
args,
128130
{ encoding: 'utf8', cwd: dir, shell: getGithubOS() === 'Windows' },
129131
(err, stdout, stderr) => {
130132
if (err) {

0 commit comments

Comments
 (0)