Skip to content

Commit

Permalink
Merge pull request #3000 from vkarak/bugfix/autodetect-rm-workdir-on-…
Browse files Browse the repository at this point in the history
…error

[bugfix] Always remove temporary directory when remote auto-detection fails
  • Loading branch information
vkarak authored Sep 19, 2023
2 parents 78b1109 + d566100 commit b7b9e3e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions reframe/frontend/autodetect.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ def __enter__(self):
shutil.copy2(src, self._workdir)
except FileNotFoundError:
use_pip = True
except Exception as err:
osext.rmtree(self._workdir)
raise err

return self._workdir, use_pip

Expand Down

0 comments on commit b7b9e3e

Please sign in to comment.