Skip to content

Commit

Permalink
update package .to
Browse files Browse the repository at this point in the history
  • Loading branch information
carolineechen committed Jun 18, 2024
1 parent 2d27a4f commit 6d7f351
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion runhouse/resources/packages/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,21 @@ def to(
"`install_target` must be a Folder in order to copy the package to a system."
)

if (
isinstance(self.install_target.system, str)
and not self.install_target.system == "file"
):
self.install_target.system = _get_cluster_from(self.install_target.system)

install_system_name = (
self.install_target.system.name
if isinstance(self.install_target.system, Cluster)
else self.install_target.system
)
system = _get_cluster_from(system)
if self.install_target.system == system:
system_name = system.name if isinstance(system, Cluster) else system

if system_name == install_system_name:
return self

if isinstance(system, Resource):
Expand Down

0 comments on commit 6d7f351

Please sign in to comment.