From 71f6619b2056528ac3af13236c5a700038727070 Mon Sep 17 00:00:00 2001 From: Michael Sarahan Date: Tue, 11 Sep 2018 09:50:55 -0500 Subject: [PATCH] handle permission errors with move more gracefully --- conda_build/index.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conda_build/index.py b/conda_build/index.py index b698794fcd..c856ed316f 100644 --- a/conda_build/index.py +++ b/conda_build/index.py @@ -407,7 +407,10 @@ def _maybe_write(path, content, write_newline_end=False, content_is_binary=False os.unlink(temp_path) return False # log.info("writing %s", path) - move(temp_path, path) + try: + move(temp_path, path) + except PermissionError: + utils.copy_into(temp_path, path) return True