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

Symlinked path doesn't point to correct location #7

Closed
morganestes opened this issue Nov 14, 2017 · 2 comments · Fixed by #9
Closed

Symlinked path doesn't point to correct location #7

morganestes opened this issue Nov 14, 2017 · 2 comments · Fixed by #9

Comments

@morganestes
Copy link

When I run install.sh, the directory gets declared as ., resulting in a symlink path of ./asimov inside /usr/local/bin. This causes the script to fail as it can't find the correct path of the executable inside the repo.

Changing to $(pwd) inside the installer fixes this, so the symlink points to the full path and not the relative one.

morganestes added a commit to morganestes/asimov that referenced this issue Nov 14, 2017
Switch to using `pwd` for absolute paths instead of the relative path
generated by `dirname $0`.

Longer description about what and why, if it's needed. Don't be afraid
to be verbose as necessary, and don't go longer than 72 chars per line.
stevegrunwell added a commit that referenced this issue Nov 24, 2017
Rather than relying on `$(dirname "$0")` or `$(pwd)`, which can have issues with relative paths (e.g. "./install.sh") or the user's current working directory, respectively), this approach literally changes into the script directory to get the full directory. Based on https://stackoverflow.com/a/4774063/329911.

Fixes #7 and closes #8. Props @morganestes.
@stevegrunwell
Copy link
Owner

Morgan, as usual:

  1. Thanks for the detailed bug report and pull request; you're always one of the first to try out my latest projects and let me know when things don't go as planned.
  2. Sorry this has been hanging out there for over a week, despite being a one-line change.

Happy Thanksgiving! 🦃

@morganestes
Copy link
Author

Thanks for creating and sharing some great tools! No worries about timing, it's yours to do with as you see fit, and mine to use and suggest. :smiling:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants