Skip to content

Commit 6550de5

Browse files
committed
Limit parsing the args from composer.json to with and enable
1 parent 67e2548 commit 6550de5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

extension/BuildPhpExtension/private/Get-ExtensionConfig.ps1

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,12 @@ 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-
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 )"
100+
if($_.name -eq "enable-$($Extension.ToLower())" -or $_.name -eq "with-$($Extension.ToLower())") {
101+
if($null -ne $_."needs-value" -and $_."needs-value" -eq $true -and $_.name -eq "with-$($Extension.ToLower())") {
102+
$config.options += "--$($_.name)=shared"
103+
} else {
104+
$config.options += "--$( $_.name )"
105+
}
104106
}
105107
}
106108
}

0 commit comments

Comments
 (0)