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

Fix resolving PGMODELER_ROOT from pgmodeler.vars #1193

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

rokkie
Copy link
Contributor

@rokkie rokkie commented Oct 28, 2018

When pgmodeler.vars is source'd the $0 variable expands to '-bash'
which causes readlink to fail and PGMODELER_ROOT being set to the wrong
directory.
This is fixed by using a while loop that recursively changes directory
following symlinks along the way util it reaches the end and then reads
the current working directory.
For more info, see:
https://gist.github.com/TheMengzor/968e5ea87e99d9c41782

When pgmodeler.vars is source'd the $0 variable expands to '-bash'
which causes readlink to fail and PGMODELER_ROOT being set to the wrong
directory.
This is fixed by using a while loop that recursively changes directory
following symlinks along the way util it reaches the end and then reads
the current working directory.
For more info, see:
https://gist.github.com/TheMengzor/968e5ea87e99d9c41782
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 this pull request may close these issues.

None yet

1 participant