Skip to content

Commit f9a8231

Browse files
committed
simpler check
1 parent c96d503 commit f9a8231

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/SPC/builder/Extension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace SPC\builder;
66

7+
use PharIo\Version\BuildMetaData;
78
use SPC\exception\FileSystemException;
89
use SPC\exception\RuntimeException;
910
use SPC\exception\WrongUsageException;
@@ -83,7 +84,7 @@ public function getConfigureArg(bool $shared = false): string
8384
*/
8485
public function getEnableArg(bool $shared = false): string
8586
{
86-
$escapedPath = str_replace("'", '', escapeshellarg(BUILD_ROOT_PATH)) !== BUILD_ROOT_PATH ? '"' . BUILD_ROOT_PATH . '"' : BUILD_ROOT_PATH;
87+
$escapedPath = str_contains(BUILD_ROOT_PATH, ' ') ? '"' . BUILD_ROOT_PATH . '"' : BUILD_ROOT_PATH;
8788
$_name = str_replace('_', '-', $this->name);
8889
return match ($arg_type = Config::getExt($this->name, 'arg-type', 'enable')) {
8990
'enable' => '--enable-' . $_name . ($shared ? '=shared' : '') . ' ',

0 commit comments

Comments
 (0)