Skip to content

Commit d172b16

Browse files
committed
Improve parsing composer.json
1 parent 526dc99 commit d172b16

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

extension/BuildPhpExtension/private/Get-ExtensionConfig.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ Function Get-ExtensionConfig {
9797
}
9898
if($null -ne $composerJson -and $null -ne $composerJson."php-ext" -and $null -ne $composerJson."php-ext"."configure-options") {
9999
$composerJson."php-ext"."configure-options" | ForEach-Object {
100-
$config.options += "--$( $_.name )"
100+
if($null -ne $_."needs-value" -and $_."needs-value" -eq $true -and $_.name -eq "with-$($Extension.ToLower())") {
101+
$config.options += "--$($_.name)=shared"
102+
} else {
103+
$config.options += "--$( $_.name )"
104+
}
101105
}
102106
}
103107
$config.options = $config.options -join " "

0 commit comments

Comments
 (0)