Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recursive delete of files and folders after installation is finished #97

Merged
merged 9 commits into from
Apr 2, 2020
Merged

Add recursive delete of files and folders after installation is finished #97

merged 9 commits into from
Apr 2, 2020

Conversation

Samuell1
Copy link
Member

Copy link
Contributor

@LukeTowers LukeTowers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, testing needed still though. @w20k can you take a look?

@w20k
Copy link

w20k commented Jul 23, 2019

@LukeTowers, sure! Will run a few tests, tomorrow!
Will ping you, when finished.

@w20k
Copy link

w20k commented Jul 29, 2019

@LukeTowers works fine, but one minor fix should be added.

It doesn't remove install.php (README.md as well) file from the root directory. And if something failed during the process it adds .log file inside of install_files dir: install_files/install.log. So, when the installation is finished, and successfully, it will still fail.

Screenshot:
Screenshot 2019-07-29 at 19 42 55

@LukeTowers
Copy link
Contributor

@Samuell1 could you look into that please?

@Samuell1
Copy link
Member Author

@LukeTowers i think we should move install.log from install_files folder to root.

@w20k
Copy link

w20k commented Aug 6, 2019

@Samuell1 tried your latest fix. Now install.log is there, install.php was removed, but dirs still there.
Screenshot 2019-08-06 at 16 58 20

@LukeTowers
Copy link
Contributor

Under what conditions would you retain install.log but not retain the install files? AFAIK install.log is just for if there was an error preventing the installation from completing, in which case you would not want to remove the install_files?

@Samuell1
Copy link
Member Author

Samuell1 commented Aug 6, 2019

@LukeTowers install.log is not created only on errors but after every step.

@LukeTowers
Copy link
Contributor

@Samuell1 so if there are any errors period the installation will not complete and the files will not be removed? If that's the case then I would prefer that a fully clean install.log (i.e. no errors) just gets removed along with the rest of the installation files.

@Samuell1
Copy link
Member Author

I think it should work like that now.

@LukeTowers
Copy link
Contributor

@Samuell1 So you can verify that after the install process is successfully completed all install files (install_files directory, install.log, install.php) are completely removed?

@w20k
Copy link

w20k commented Sep 26, 2019

@Samuell1 ping me if re-test is needed.

@Samuell1
Copy link
Member Author

@w20k You can if you have time but i tested it yesterday and works great. I sended a video of steps to @LukeTowers privately.

@LukeTowers
Copy link
Contributor

@w20k can you test what happens if the install fails at any point before or during the cleanInstall step? I would like to get rid of the notice at the end telling people to clean up after the installer but I don't want to remove it outright if we aren't handling failure cases properly (such as error during install or incorrect permissions to remove the files required to clean up after the installation process)

@w20k
Copy link

w20k commented Sep 27, 2019

Sure @LukeTowers will do!

@Samuell1
Copy link
Member Author

@LukeTowers if cleaning of files will throw error it will silently continue.

@LukeTowers LukeTowers changed the base branch from master to wip/self-cleanup April 2, 2020 18:01
@LukeTowers LukeTowers merged commit 5bfb1f8 into octobercms:wip/self-cleanup Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Make installer clean up after itself
4 participants