You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.
For native windows binaries, this works well. But when wsl is involved (even if it's subprocess invoked from simple windows exe file) returned promise does not resolve because callback passed to child_process.exec isn't called. I'm not sure if this is an issue of rls-vscode, but this can be workarounded.
Also, I'm sure that command itself is invoked, because stdout is set to nightly-x86_64-unknown-linux-gnu (default) if I set timeout. (but timeout error occurs)
When I modify definition like below and invocations, it works.
exportasyncfunctionexecChildProcess(command: string,args: string[]): Promise<ExecChildProcessResult>{// FIXME: asyncconstchild=child_process.spawnSync(command,args,{encoding: 'utf8'},);if(child.error){thrownewError(`Error running `${command}`: ${child.error}`);}if(child.status>0){thrownewError(`Error getting sysroot from `${command}`: exited with \`${child.status}\``);}if(!child.stdout||typeofchild.stdout.toString!=='function'){thrownewError(`Couldn't get sysroot from `${command}`: Got no ouput`);}return{stdout: child.stdout,stderr: child.stderr,};}
So.. child_process.execseems like a root of issue. This should be replaced withchild_process.spawn` to work with wsl.
The text was updated successfully, but these errors were encountered:
https://github.com/rust-lang-nursery/rls-vscode/blob/5afe3bbe5b6cf538cafea9bf8bfe3b3779026041/src/utils/child_process.ts#L25-L40
For native windows binaries, this works well. But when wsl is involved (even if it's subprocess invoked from simple windows exe file) returned promise does not resolve because callback passed to
child_process.exec
isn't called. I'm not sure if this is an issue of rls-vscode, but this can be workarounded.Also, I'm sure that command itself is invoked, because
stdout
is set tonightly-x86_64-unknown-linux-gnu (default)
if I set timeout. (but timeout error occurs)When I modify definition like below and invocations, it works.
So.. child_process.exec
seems like a root of issue. This should be replaced with
child_process.spawn` to work with wsl.The text was updated successfully, but these errors were encountered: