Skip to content

[Bug]: php-xdebug: post-install script fails when PHP is not installed #2638

@z-Fng

Description

@z-Fng
PS> scoop install php84-xdebug
Installing 'php84-xdebug' (3.5.0-8.4) [64bit] from 'versions' bucket
Loading php_xdebug-3.5.0-8.4-ts-vs17-x86_64.dll from cache
Checking hash of php_xdebug-3.5.0-8.4-ts-vs17-x86_64.dll... OK.
Linking D:\Scoop\apps\php84-xdebug\current => D:\Scoop\apps\php84-xdebug\3.5.0-8.4
Running post_install script... Convert-Path : Cannot find path 'D:\Scoop\persist\php84\cli\conf.d' because it does not exist.
At line:4 char:40
+     Write-Output "Enabling extension $(Convert-Path $phpconfd)\xdebug ...
+                                        ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (D:\Scoop\persist\php84\cli\conf.d:String) [Convert-Path], ItemNotFoundE
   xception
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ConvertPathCommand

Enabling extension \xdebug.ini
Add-Content : Could not find a part of the path 'D:\Scoop\persist\php84\cli\conf.d\xdebug.ini'.
At line:5 char:5
+     Add-Content -Value $ini -Path "$phpconfd\xdebug.ini"
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (D:\Scoop\persis...nf.d\xdebug.ini:String) [Add-Content], DirectoryNotFo
   undException
    + FullyQualifiedErrorId : GetContentWriterDirectoryNotFoundError,Microsoft.PowerShell.Commands.AddContentCommand

Done.
'php84-xdebug' (3.5.0-8.4) was installed successfully!
Notes
-----
Xdebug is already enabled if PHP 8.4 was installed through scoop!
Otherwise add 'D:\Scoop\apps\php84-xdebug\current\php_xdebug.dll' to your php.ini
-----

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions