check if last workfile exist before env variable is set

This commit is contained in:
iLLiCiTiT 2020-07-14 15:04:42 +02:00
parent 1c676d95f1
commit 05cc4385df

View file

@ -216,7 +216,7 @@ class AppAction(BaseAction):
"AVALON_HIERARCHY": hierarchy,
"AVALON_WORKDIR": workdir
})
if last_workfile_path:
if last_workfile_path and os.path.exists(last_workfile_path):
prep_env["AVALON_LAST_WORKFILE"] = last_workfile_path
prep_env.update(anatomy.roots_obj.root_environments())