Skip to content

Commit

Permalink
use proper path to create host-config symlink (#119)
Browse files Browse the repository at this point in the history
* use proper path to create symlink

* Update uberenv.py

Co-authored-by: Alex Tyler Chapman <100869159+chapman39@users.noreply.github.com>

---------

Co-authored-by: Alex Tyler Chapman <100869159+chapman39@users.noreply.github.com>
  • Loading branch information
cyrush and chapman39 authored Aug 23, 2023
1 parent d934c61 commit 991a9ce
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions uberenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -1065,12 +1065,13 @@ def install(self):
if len(hc_glob) > 0:
hc_path = hc_glob[0]
hc_fname = os.path.split(hc_path)[1]
if os.path.islink(hc_fname):
os.unlink(hc_fname)
elif os.path.isfile(hc_fname):
sexe("rm -f {0}".format(hc_fname))
print("[symlinking host config file to {0}]".format(pjoin(self.dest_dir,hc_fname)))
os.symlink(hc_path,hc_fname)
hc_symlink_path = pjoin(self.dest_dir,hc_fname)
if os.path.islink(hc_symlink_path):
os.unlink(hc_symlink_path)
elif os.path.isfile(hc_symlink_path):
sexe("rm -f {0}".format(hc_symlink_path))
print("[symlinking host config file {0} to {1}]".format(hc_path,hc_symlink_path))
os.symlink(hc_path,hc_symlink_path)
# if user opt'd for an install, we want to symlink the final
# install to an easy place:
# Symlink install directory
Expand Down

0 comments on commit 991a9ce

Please sign in to comment.