Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix findNodeViaShell to run within the workspace folder #406

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,16 @@
return new Promise<string | undefined>(resolve => {
const startToken = '___START_PW_SHELL__';
const endToken = '___END_PW_SHELL__';
const cwd = vscode.workspace.workspaceFolders ? vscode.workspace.workspaceFolders[0] : undefined;
const childProcess = spawn(`${vscode.env.shell} -i -c 'echo ${startToken} && which node && echo ${endToken}'`, {
stdio: 'pipe',

Check failure on line 172 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on ubuntu-latest, Node 16

No overload matches this call.

Check failure on line 172 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on windows-latest, Node 16

No overload matches this call.

Check failure on line 172 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on macos-latest, Node 16

No overload matches this call.

Check failure on line 172 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on ubuntu-latest, Node 18

No overload matches this call.
shell: true
shell: true,
cwd,
});
let output = '';
childProcess.stdout.on('data', data => output += data.toString());

Check failure on line 177 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on ubuntu-latest, Node 16

Property 'stdout' does not exist on type 'never'.

Check failure on line 177 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on ubuntu-latest, Node 16

Parameter 'data' implicitly has an 'any' type.

Check failure on line 177 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on windows-latest, Node 16

Property 'stdout' does not exist on type 'never'.

Check failure on line 177 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on windows-latest, Node 16

Parameter 'data' implicitly has an 'any' type.

Check failure on line 177 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on macos-latest, Node 16

Property 'stdout' does not exist on type 'never'.

Check failure on line 177 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on macos-latest, Node 16

Parameter 'data' implicitly has an 'any' type.

Check failure on line 177 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on ubuntu-latest, Node 18

Property 'stdout' does not exist on type 'never'.

Check failure on line 177 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on ubuntu-latest, Node 18

Parameter 'data' implicitly has an 'any' type.
childProcess.on('error', () => resolve(undefined));

Check failure on line 178 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on ubuntu-latest, Node 16

Property 'on' does not exist on type 'never'.

Check failure on line 178 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on windows-latest, Node 16

Property 'on' does not exist on type 'never'.

Check failure on line 178 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on macos-latest, Node 16

Property 'on' does not exist on type 'never'.

Check failure on line 178 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on ubuntu-latest, Node 18

Property 'on' does not exist on type 'never'.
childProcess.on('exit', exitCode => {

Check failure on line 179 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on ubuntu-latest, Node 16

Property 'on' does not exist on type 'never'.

Check failure on line 179 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on ubuntu-latest, Node 16

Parameter 'exitCode' implicitly has an 'any' type.

Check failure on line 179 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on windows-latest, Node 16

Property 'on' does not exist on type 'never'.

Check failure on line 179 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on windows-latest, Node 16

Parameter 'exitCode' implicitly has an 'any' type.

Check failure on line 179 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on macos-latest, Node 16

Property 'on' does not exist on type 'never'.

Check failure on line 179 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on macos-latest, Node 16

Parameter 'exitCode' implicitly has an 'any' type.

Check failure on line 179 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on ubuntu-latest, Node 18

Property 'on' does not exist on type 'never'.

Check failure on line 179 in src/utils.ts

View workflow job for this annotation

GitHub Actions / Run tests on ubuntu-latest, Node 18

Parameter 'exitCode' implicitly has an 'any' type.
if (exitCode !== 0)
return resolve(undefined);
const start = output.indexOf(startToken);
Expand Down
Loading