diff --git a/mesmerize_core/utils.py b/mesmerize_core/utils.py index e168017..0ded2ac 100644 --- a/mesmerize_core/utils.py +++ b/mesmerize_core/utils.py @@ -96,6 +96,10 @@ def make_runfile( args_str = "" if not IS_WINDOWS: + # remove file first if it exists - avoid issues with ownership + if os.path.exists(sh_file): + os.remove(sh_file) + with open(sh_file, "w") as f: f.write(f"#!/bin/bash\n")