Skip to content

Commit 459afae

Browse files
committed
fix dir
1 parent 94a2d60 commit 459afae

File tree

3 files changed

+28
-24
lines changed

3 files changed

+28
-24
lines changed

.github/workflows/pr-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ env:
99
NODE_VERSION: 22.17.0
1010
TEST_RESULTS_DIRECTORY: .
1111
# Force a path with spaces and unicode chars to test extension works in these scenarios
12-
special-working-directory: './🐍 🐛'
13-
special-working-directory-relative: '🐍 🐛'
12+
special-working-directory: './testDir'
13+
special-working-directory-relative: 'testDir'
1414

1515
jobs:
1616
build-vsix:

.github/workflows/push-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ env:
1414
NODE_VERSION: 22.17.0
1515
TEST_RESULTS_DIRECTORY: .
1616
# Force a path with spaces and unicode chars to test extension works in these scenarios
17-
special-working-directory: './🐍 🐛'
18-
special-working-directory-relative: '🐍 🐛'
17+
special-working-directory: './testDir'
18+
special-working-directory-relative: 'testDir'
1919

2020
jobs:
2121
build-vsix:

src/test/runTest.ts

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,32 @@ async function main() {
2323
console.log('[DEBUG] cliPath:', cliPath);
2424
console.log('[DEBUG] args:', args);
2525
console.log('[DEBUG] cwd:', path.dirname(cliPath));
26-
const installResult = cp.spawnSync(
27-
cliPath,
28-
[...args, '--install-extension', PVSC_EXTENSION_ID_FOR_TESTS, PVSC_ENVS_EXTENSION_ID_FOR_TESTS],
29-
{
30-
cwd: path.dirname(cliPath),
31-
encoding: 'utf8',
32-
stdio: 'inherit',
33-
shell: true,
34-
},
35-
);
36-
console.log('[DEBUG] installResult:', installResult);
37-
if (installResult.error) {
38-
console.error('Extension installation error:', installResult.error);
39-
}
40-
if (installResult.status !== 0) {
41-
console.error(`Extension installation failed with exit code: ${installResult.status}`);
42-
if (installResult.stderr) {
43-
console.error('[DEBUG] stderr:', installResult.stderr.toString());
26+
try {
27+
const installResult = cp.spawnSync(
28+
cliPath,
29+
[...args, '--install-extension', PVSC_EXTENSION_ID_FOR_TESTS, PVSC_ENVS_EXTENSION_ID_FOR_TESTS],
30+
{
31+
cwd: path.dirname(cliPath),
32+
encoding: 'utf8',
33+
stdio: 'inherit',
34+
shell: true,
35+
},
36+
);
37+
console.log('[DEBUG] installResult:', installResult);
38+
if (installResult.error) {
39+
console.error('Extension installation error:', installResult.error);
4440
}
45-
if (installResult.stdout) {
46-
console.error('[DEBUG] stdout:', installResult.stdout.toString());
41+
if (installResult.status !== 0) {
42+
console.error(`Extension installation failed with exit code: ${installResult.status}`);
43+
if (installResult.stderr) {
44+
console.error('[DEBUG] stderr:', installResult.stderr.toString());
45+
}
46+
if (installResult.stdout) {
47+
console.error('[DEBUG] stdout:', installResult.stdout.toString());
48+
}
4749
}
50+
} catch (ex) {
51+
console.error('Exception during extension installation:', ex);
4852
}
4953
} else {
5054
console.log('[DEBUG] Non-Windows detected');

0 commit comments

Comments
 (0)