File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ protected function deployBinary(int $type): void
238238 } elseif (!$ no_strip_option && PHP_OS_FAMILY === 'Linux ' ) {
239239 shell ()
240240 ->exec ("objcopy --only-keep-debug {$ src } {$ src }.debug " ) // extract debug symbols
241- ->exec ("objcopy --strip-debug -- add-gnu-debuglink= {$ src }.debug {$ src }" ) // link debug symbols
241+ ->exec ("objcopy --add-gnu-debuglink= {$ src }.debug {$ src }" ) // link debug symbols
242242 ->exec ("strip --strip-unneeded {$ src }" ); // strip unneeded symbols
243243 $ copy_files [] = "{$ src }.debug " ;
244244 }
@@ -274,7 +274,10 @@ protected function deployBinary(int $type): void
274274 if (!file_exists ($ file )) {
275275 throw new SPCInternalException ("Deploy failed. Cannot find file: {$ file }" );
276276 }
277- FileSystem::copy ($ file , BUILD_BIN_PATH . '/ ' . basename ($ file ));
277+ // ignore copy to self
278+ if (realpath ($ file ) !== realpath (BUILD_BIN_PATH . '/ ' . basename ($ file ))) {
279+ shell ()->exec ('cp ' . escapeshellarg ($ file ) . ' ' . escapeshellarg (BUILD_BIN_PATH . '/ ' ));
280+ }
278281 }
279282 }
280283
You can’t perform that action at this time.
0 commit comments