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

Don't delete images dist while clean #962

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

uncleDecart
Copy link
Member

In case if someone is trying to use local EVE it could lead to repo deletion

In case if someone is trying to use local EVE it could lead
to repo deletion

Signed-off-by: Pavel Abramov <[email protected]>
@giggsoff
Copy link
Collaborator

giggsoff commented Feb 27, 2024

In that case we will not able to clean current context completely. ./eden clean --current-context will leave the directory with images unconditionally.
Can we use something more precisely, for e.g. delete dist/CONTEXT-images (assuming that user-pointed image is outside of dist) or use some flag (to keep image)? Probably the easiest option is to check if imagesDist is sub-directory of eveDist and if not, keep.

@OhmSpectator
Copy link
Member

This code has just completely removed my ~/projects, with all the projects inside (tens of them). I demand this code to be eliminated!!! (Well, if the code is fixed and no one can get the same, I'm also happy))

@uncleDecart
Copy link
Member Author

@giggsoff , when you want to run EVE locally and you point to an image (or a folder in our case, because I didn't remember) and then you do make clean it'll delete the directory, quite cruel behaviour. Maybe we can delete it only if path to EVE is not specified

@giggsoff
Copy link
Collaborator

@giggsoff , when you want to run EVE locally and you point to an image (or a folder in our case, because I didn't remember) and then you do make clean it'll delete the directory, quite cruel behaviour. Maybe we can delete it only if path to EVE is not specified

Current logic is to fill options by default, including EVE path. It is not easy to check if user override it manually.
As I mentioned, we can try to delete dist/CONTEXT-images as a path where eden-generated images stored.

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.

3 participants