Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Commit 6eb6794

Browse files
authored
Merge pull request #58 from OpenForgeProject/copilot/sub-pr-56
Handle null status in isDdevRunning and use separate args for PHPStan options
2 parents f7f59d2 + ec73220 commit 6eb6794

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

src/services/phpstan-service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ export class PhpstanService extends BasePhpToolService {
7070
command.push('-c', autoConfigPath);
7171
} else {
7272
// Use individual settings when no config file is found
73-
command.push(`--level=${this.config.level}`);
73+
command.push('--level', String(this.config.level));
7474

7575
// Add exclude paths
7676
if (this.config.excludePaths && this.config.excludePaths.length > 0) {
7777
for (const excludePath of this.config.excludePaths) {
78-
command.push(`--exclude=${excludePath}`);
78+
command.push('--exclude', excludePath);
7979
}
8080
}
8181
}

src/shared/utils/ddev-utils.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ export class DdevUtils {
6767
cwd: workspacePath,
6868
encoding: 'utf-8'
6969
});
70+
if (result.error) {
71+
vscode.window.showErrorMessage(
72+
'Failed to execute "ddev". Please ensure DDEV is installed and available in your PATH.',
73+
);
74+
return false;
75+
}
76+
if (result.status === null) {
77+
vscode.window.showErrorMessage(
78+
'The "ddev" command did not exit normally. Please check your DDEV installation.',
79+
);
80+
return false;
81+
}
7082
return result.status === 0;
7183
} catch (error) {
7284
return false;

0 commit comments

Comments
 (0)