Skip to content

Commit 8e4d4b7

Browse files
committed
suggestion
1 parent ee906aa commit 8e4d4b7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/SPC/builder/unix/UnixBuilderBase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace SPC\builder\unix;
66

77
use SPC\builder\BuilderBase;
8+
use SPC\builder\linux\SystemUtil;
89
use SPC\builder\linux\SystemUtil as LinuxSystemUtil;
910
use SPC\exception\SPCException;
1011
use SPC\exception\SPCInternalException;
@@ -105,10 +106,9 @@ public function extractDebugInfo(string $binary_path): string
105106
if (PHP_OS_FAMILY === 'Darwin') {
106107
shell()->exec("dsymutil -f {$binary_path} -o {$debug_file}");
107108
} elseif (PHP_OS_FAMILY === 'Linux') {
108-
$has_eu_strip = shell()->execWithResult('which eu-strip')[0] === 0;
109-
if ($has_eu_strip) {
109+
if ($eu_strip = SystemUtil::findCommand('eu-strip')) {
110110
shell()
111-
->exec("eu-strip -f {$debug_file} {$binary_path}")
111+
->exec("{$eu_strip} -f {$debug_file} {$binary_path}")
112112
->exec("objcopy --add-gnu-debuglink={$debug_file} {$binary_path}");
113113
} else {
114114
shell()

0 commit comments

Comments
 (0)