diff options
author | Scott Dodson <sdodson@redhat.com> | 2016-10-19 13:55:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-19 13:55:01 -0400 |
commit | 7025459e3e4f02494e8b005623af52ca738317b4 (patch) | |
tree | afa9662170d4bbf216fbd124d638eea825433489 /roles/openshift_cli | |
parent | 3be15dae0b039e06e31b4eecc933851ada7446cb (diff) | |
parent | 3ea0166aa301990d4f95fdb1c48557e710aa0b05 (diff) | |
download | openshift-7025459e3e4f02494e8b005623af52ca738317b4.tar.gz openshift-7025459e3e4f02494e8b005623af52ca738317b4.tar.bz2 openshift-7025459e3e4f02494e8b005623af52ca738317b4.tar.xz openshift-7025459e3e4f02494e8b005623af52ca738317b4.zip |
Merge pull request #2621 from dgoodwin/symlink-fix
Switch from "oadm" to "oc adm" and fix bug in binary sync.
Diffstat (limited to 'roles/openshift_cli')
-rw-r--r-- | roles/openshift_cli/library/openshift_container_binary_sync.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/roles/openshift_cli/library/openshift_container_binary_sync.py b/roles/openshift_cli/library/openshift_container_binary_sync.py index fd290c6fc..9ff738d14 100644 --- a/roles/openshift_cli/library/openshift_container_binary_sync.py +++ b/roles/openshift_cli/library/openshift_container_binary_sync.py @@ -83,8 +83,13 @@ class BinarySyncer(object): def _sync_symlink(self, binary_name, link_to): """ Ensure the given binary name exists and links to the expected binary. """ + + # The symlink we are creating: link_path = os.path.join(self.bin_dir, binary_name) - link_dest = os.path.join(self.bin_dir, binary_name) + + # The expected file we should be linking to: + link_dest = os.path.join(self.bin_dir, link_to) + if not os.path.exists(link_path) or \ not os.path.islink(link_path) or \ os.path.realpath(link_path) != os.path.realpath(link_dest): |