File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
extension/BuildPhpExtension/private Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -91,11 +91,15 @@ Function Get-ExtensionConfig {
9191 $composerJson = Get-Content composer.json - Raw | ConvertFrom-Json
9292 }
9393 if ($null -ne $composerJson -and $null -ne $composerJson ." php-ext" -and $null -ne $composerJson ." php-ext" ." configure-options" ) {
94+ $normalizedExtension = $Extension.ToLower ().Replace(" _" , " -" )
9495 $composerJson ." php-ext" ." configure-options" | ForEach-Object {
95- if ($null -ne $_ ." needs-value" -and $_ ." needs-value" -eq $true -and $_.name -eq " with-$ ( $Extension.ToLower ()) " ) {
96- $config.options += " --$ ( $_.name ) =shared"
97- } else {
98- $config.options += " --$ ( $_.name ) "
96+ $normalizedName = $_.name.ToLower ().Replace(" _" , " -" )
97+ if ($normalizedName -eq " enable-$normalizedExtension " -or $normalizedName -eq " with-$normalizedExtension " ) {
98+ if ($null -ne $_ ." needs-value" -and $_ ." needs-value" -eq $true -and $normalizedName -eq " with-$normalizedExtension " ) {
99+ $config.options += " --$ ( $_.name ) =shared"
100+ } else {
101+ $config.options += " --$ ( $_.name ) "
102+ }
99103 }
100104 }
101105 }
You can’t perform that action at this time.
0 commit comments