Skip to content

Commit 929c775

Browse files
authored
Merge pull request #94 from TimWolla/configure-flag-quoting
Remove `escapeshellarg()` quoting for configure flags
2 parents 5b8426b + 678d4cf commit 929c775

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/Command/CommandHelper.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
use Webmozart\Assert\Assert;
2323

2424
use function array_key_exists;
25-
use function escapeshellarg;
2625
use function is_array;
2726
use function is_string;
2827
use function reset;
@@ -225,7 +224,7 @@ public static function processConfigureOptionsFromInput(Package $package, InputI
225224

226225
if ($configureOption->needsValue) {
227226
if (is_string($value) && $value !== '') {
228-
$configureOptionsValues[] = '--' . $configureOption->name . '=' . escapeshellarg($value);
227+
$configureOptionsValues[] = '--' . $configureOption->name . '=' . $value;
229228
}
230229

231230
continue;

test/behaviour/CliContext.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function theExtensionShouldHaveBeenBuiltWithOptions(): void
103103
}
104104

105105
Assert::contains($this->output, 'phpize complete.');
106-
Assert::contains($this->output, 'Configure complete with options: --with-hello-name=\'sup\'');
106+
Assert::contains($this->output, 'Configure complete with options: --with-hello-name=sup');
107107
Assert::contains($this->output, 'Build complete:');
108108
}
109109

test/unit/Command/CommandHelperTest.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030
use function array_combine;
3131
use function array_map;
32-
use function escapeshellarg;
3332

3433
#[CoversClass(CommandHelper::class)]
3534
final class CommandHelperTest extends TestCase
@@ -174,7 +173,7 @@ public function testProcessingConfigureOptionsFromInput(): void
174173

175174
self::assertSame(
176175
[
177-
'--with-stuff=' . escapeshellarg('lolz'),
176+
'--with-stuff=lolz',
178177
'--enable-thing',
179178
],
180179
$options,

0 commit comments

Comments
 (0)