diff --git a/src/cmd-prune b/src/cmd-prune index aadd455831..660eae5790 100755 --- a/src/cmd-prune +++ b/src/cmd-prune @@ -176,7 +176,8 @@ error_during_pruning = False for build in builds_to_delete: print(f"Pruning build {build.id}") try: - subprocess.check_call(['ostree', '--repo=tmp/repo', 'refs', '--delete', build.id]) + if os.path.exists('tmp/repo'): + subprocess.check_call(['ostree', '--repo=tmp/repo', 'refs', '--delete', build.id]) rmtree(os.path.join(builds_dir, build.id)) except Exception as e: error_during_pruning = True