Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use proper path to create host-config symlink #119

Merged
merged 2 commits into from
Aug 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Copy link
Member Author

@cyrush cyrush Aug 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this guy was the issue, it wasn't using the pjoined path that was actually printed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my mistake. thank you for catching this

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