overhangio / tutor-indigo

An elegant, customizable theme for Open edX
GNU Affero General Public License v3.0
74 stars 276 forks source link

When plugin is removed should it clean up it's build directory artficats #30

Closed misilot closed 2 years ago

misilot commented 2 years ago

For example if you do the following

pip install tutor-indigo
tutor plugins enable indigo
tutor config save

the indigo folder is created at $TUTOR_ROOT/env/build/openedx/themes and persists after running.

tutor plugins disable indigo
tutor config save

Should it, or should it be removed?

misilot commented 2 years ago

Actually, I just read the output

Disabling plugin indigo...
    env - removing folder: /klib/data/nla-openedx/env/build/openedx/themes/indigo
Plugin indigo disabled
Configuration saved to /klib/data/nla-openedx/config.yml
You should now re-generate your environment with `tutor config save`.

It doesn't seem to remove the folder

regisb commented 2 years ago

It doesn't seem to remove the folder

It does, on my machine. According to this piece of code, the directory should be removed if its name was printed in stdout: https://github.com/overhangio/tutor/blob/b8f773a5efde67a769301aecf8434b8c19bbea93/tutor/env.py#L467

misilot commented 2 years ago

Hmm, ok. So it is working.

Sorry, it is artifacts from the forked plugin I am trying to get working. Where it is installing it under indigo instead of the directory specified in the configuration, but then doesn't clean up itself.