Skip to content

Commit 9be8898

Browse files
committed
clean up installer plugin exports and temp files after platform installs are complete
1 parent ecb03d6 commit 9be8898

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bin/compile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ else
512512
EOF
513513
fi
514514

515-
export -n providedextensionslog_file_path # export no longer needed
515+
export -n providedextensionslog_file_path # export no longer needed (and we don't want more entries written by the plugin even if it encounters them)
516516
if [[ -s "$providedextensionslog_file_path" ]]; then
517517
notice_inline "detected userland polyfill packages for PHP extensions"
518518
notice_inline "now attempting to install native extension packages"
@@ -538,6 +538,11 @@ if [[ -s "$providedextensionslog_file_path" ]]; then
538538
exec {fd_num}>&-
539539
fi
540540

541+
# clean up installer variables and files
542+
unset export_file_path
543+
unset profile_dir_path
544+
rm -f "$providedextensionslog_file_path"
545+
unset providedextensionslog_file_path
541546
unset PHP_PLATFORM_INSTALLER_DISPLAY_OUTPUT_FDNO PHP_PLATFORM_INSTALLER_DISPLAY_OUTPUT_INDENT
542547

543548
# log number of installed platform packages

0 commit comments

Comments
 (0)