Skip to content

Skip removing the install folder when the installer already did - #486

Draft
boo-code wants to merge 1 commit into
PrestaShop:masterfrom
boo-code:fix/skip-removed-install-folder
Draft

boo-code wants to merge 1 commit into
PrestaShop:masterfrom
boo-code:fix/skip-removed-install-folder

Conversation

@boo-code

Copy link
Copy Markdown

PrestaShop 9.2 removes install/ itself at the end of the installation (Install::finalize() logs "The install/ folder was removed."). docker_run.sh runs under set -e and then calls rm -r on that folder, so a successful auto-install ends with:

-- Installation successful! --
* Removing install folder...
rm: cannot remove '/var/www/html/install/': No such file or directory

and the container exits with code 1 before Apache starts.

The folder is now removed only when it is still there. Versions that leave it behind keep the current behaviour, and a failure to remove it still stops the script. The change is the same in base/config_files/docker_run.sh and in the 20 generated copies.

Tested with prestashop/prestashop:9.2.0-6.0-rc.1-classic-8.4-apache, PS_INSTALL_AUTO=1, PS_FOLDER_ADMIN=admin123, with this script mounted as /tmp/docker_run.sh: the install completes, the web server starts, the front office answers 200 and the back office 302. That run also needs PrestaShop/PrestaShop#42639: RC1 stops earlier, in finalize(), on assets:install admin-dev when the admin folder was renamed before the installer ran, which this image does.

PrestaShop 9.2 removes install/ itself at the end of the installation
(Install::finalize() logs "The install/ folder was removed."). docker_run.sh
runs under set -e and then called rm -r on the folder that is gone, so a
successful auto-install ended with "rm: cannot remove '/var/www/html/install/'"
and the container exited before starting Apache.

Remove it only when it is still there, so older versions keep the same
behaviour and a failure to remove it still stops the script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant