Skip to content

Commit d566100

Browse files
committed
Always remove temp dir when remote auto-detection fails
1 parent 78b1109 commit d566100

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

reframe/frontend/autodetect.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ def __enter__(self):
5959
shutil.copy2(src, self._workdir)
6060
except FileNotFoundError:
6161
use_pip = True
62+
except Exception as err:
63+
osext.rmtree(self._workdir)
64+
raise err
6265

6366
return self._workdir, use_pip
6467

0 commit comments

Comments
 (0)