mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-11 05:53:23 -05:00
chore: refuse a busy output before any work
This commit is contained in:
1 parent
3adb34d322
commit
3d7852cdb7
2 files changed
+12
-1
No files matched your search
@@ -235,6 +235,17 @@ def main():
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
# A second run on the same output directory is refused before any work:
|
||||
# the database rebuild alone takes minutes, and the reader holding the
|
||||
# directory would otherwise see the answer only after all of it.
|
||||
if not args.skip_packs and Path(args.output_dir).is_dir():
|
||||
try:
|
||||
with artifact_lock(args.output_dir):
|
||||
pass
|
||||
except ArtifactLockBusy as exc:
|
||||
print(f"ERROR: {exc}")
|
||||
sys.exit(1)
|
||||
|
||||
results = {}
|
||||
all_ok = True
|
||||
total_start = time.monotonic()
|
||||
|
||||
Reference in new issue
Block a user