inventree / InvenTree

Open Source Inventory Management System
https://docs.inventree.org
MIT License
4.34k stars 786 forks source link

fix: Narrow scope of cleanup #8441

Closed matmair closed 2 weeks ago

matmair commented 2 weeks ago

This fixes the clear-generated task. It was previously too widely scoped and had the potential to brick users envs if they were under /opt/inventree (which is the default). This fix narrows the scope to the "src" directory - which is always guaranteed to be InvenTree internal stuff.

Fixes https://github.com/inventree/InvenTree/issues/8252 https://github.com/inventree/InvenTree/issues/8155

netlify[bot] commented 2 weeks ago

Deploy Preview for inventree-web-pui-preview canceled.

Name Link
Latest commit e7d4711c5b1a954ff807c3460ba47af7dc83c4cd
Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/672bf5ee3643f500083c37e8
SchrodingersGat commented 2 weeks ago

What happens if the invoke task is run from outside the source directory? Should we also confirm that the command is being run from the correct directory first?

matmair commented 2 weeks ago

that should not be a problem, the command uses the run wrapper that ensures that all commands are run from the root of the install

matmair commented 2 weeks ago

See https://github.com/inventree/InvenTree/blob/c062d5e48df72df8c19db962dadbc5bf868e3fc8/tasks.py#L139-L150

github-actions[bot] commented 2 weeks ago

💔 All backports failed

Status Branch Result
0.16.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

backport --pr 8441

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details