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

Handle null status in isDdevRunning and use separate args for PHPStan options#58

Merged
Morgy93 merged 2 commits intofix-code-scanningfrom
copilot/sub-pr-56
Jan 12, 2026
Merged

Handle null status in isDdevRunning and use separate args for PHPStan options#58
Morgy93 merged 2 commits intofix-code-scanningfrom
copilot/sub-pr-56

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 12, 2026

Addresses review feedback from PR #56 to improve error handling and command argument consistency.

Error handling in isDdevRunning:

  • Added explicit checks for result.error and result.status === null to distinguish between "ddev not running" vs "ddev command not found/failed" scenarios
  • Display appropriate error messages for each failure mode

PHPStan command building:

  • Changed --level=${value} and --exclude=${path} to separate arguments: '--level', value and '--exclude', path
  • Properly handles special characters and spaces in paths with spawnSync's array-based execution
// Before
command.push(`--level=${this.config.level}`);
command.push(`--exclude=${excludePath}`);

// After
command.push('--level', String(this.config.level));
command.push('--exclude', excludePath);

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…n options

Co-authored-by: Morgy93 <7961978+Morgy93@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code scanning issues Handle null status in isDdevRunning and use separate args for PHPStan options Jan 12, 2026
Copilot AI requested a review from Morgy93 January 12, 2026 13:30
@Morgy93 Morgy93 marked this pull request as ready for review January 12, 2026 13:39
@Morgy93 Morgy93 merged commit 6eb6794 into fix-code-scanning Jan 12, 2026
1 check passed
@Morgy93 Morgy93 deleted the copilot/sub-pr-56 branch January 12, 2026 13:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants