Skip to content

Commit

Permalink
fix: update with_copy with _update_attribute
Browse files Browse the repository at this point in the history
Signed-off-by: mao3267 <[email protected]>
  • Loading branch information
mao3267 committed Sep 4, 2024
1 parent 9a9707d commit 97d4192
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions flytekit/image_spec/image_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,7 @@ def with_copy(self, src: List[str]) -> "ImageSpec":
"""
Builder that returns a new image spec with the source files copied to the destination directory.
"""
new_image_spec = copy.deepcopy(self)
if new_image_spec.copy is None:
new_image_spec.copy = []

new_image_spec.copy.append(src)

new_image_spec = self._update_attribute("copy", src)
return new_image_spec

def force_push(self) -> "ImageSpec":
Expand Down

0 comments on commit 97d4192

Please sign in to comment.