easybuilders / easybuild-framework

EasyBuild is a software installation framework in Python that allows you to install software in a structured and robust way.
https://easybuild.io
GNU General Public License v2.0
147 stars 200 forks source link

`--sanity-check-only` runs commands in installation dir #4044

Open ocaisa opened 2 years ago

ocaisa commented 2 years ago

This leads to problems if the commands have output files since these will get placed in the installation

boegel commented 1 year ago

That's just because the sanity check is always run from the installation directory, this is not specific to --sanity-check-only: https://github.com/easybuilders/easybuild-framework/blob/c10f1e069fc50397f4089e48fa3bc92eff8b16a5/easybuild/framework/easyblock.py#L3438-L3440

We can consider changing that, I can see how this isn't the best possible way of running the sanity check, but doing so without breaking sanity checks won't be trivial...

branfosj commented 7 months ago

I know we have some easyconfigs where we (ab)use the sanity check as it simplifies how we write a post install command. During the sanity check all the relevant paths are set I think this was in a bioinformatics package, where it is used to download the required databases.