Skip to content

Commit

Permalink
Trying to handle the corner case of a really single file workflow wit…
Browse files Browse the repository at this point in the history
…h no repository
  • Loading branch information
jmfernandez committed Jul 10, 2023
1 parent df23753 commit fde8158
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion wfexs_backend/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,17 @@ def fetchWorkflow(
# force_copy is needed to isolate the copy of the workflow
# so local modifications in a working directory does not
# poison the cached workflow
link_or_copy(repoDir, self.workflowDir, force_copy=True)
if os.path.isdir(repoDir):
link_or_copy(repoDir, self.workflowDir, force_copy=True)
else:
os.makedirs(self.workflowDir, exist_ok=True)
if self.repoRelPath is None:
self.repoRelPath = cast("RelPath", "workflow.entrypoint")
link_or_copy(
repoDir,
cast("AbsPath", os.path.join(self.workflowDir, self.repoRelPath)),
force_copy=True,
)
# We cannot know yet the dependencies
localWorkflow = LocalWorkflow(
dir=self.workflowDir,
Expand Down

0 comments on commit fde8158

Please sign in to comment.