The existing version fails on symlinks#41
Open
struckma wants to merge 1 commit intoDaehwanKimLab:masterfrom
Open
The existing version fails on symlinks#41struckma wants to merge 1 commit intoDaehwanKimLab:masterfrom
struckma wants to merge 1 commit intoDaehwanKimLab:masterfrom
Conversation
Great tool, thank you! However, I would like to propose a patch, because we have a small problem with relative symlinks for the current tophat2.sh start script: readlink returns the plain content of the symlink, which may be a relative path resolved from the directory, the link lives in, for example "../Cellar/tophat/2.1.1_1/bin/tophat2" in case of the brew system (homebrew or linuxbrew). The relative path is handled different by the existing tophat2.sh-script than by a shell resolving a symlink. The shell would resolve it relatively to the link's directory, the original tophat2.sh script tries to resolve it relatively to the current working directory, which usually fails. The proposed change will take care of this issue and set DIR to the real directory tophat2.sh lives in. For Linux only, the readlink command supports a "-f" parameter making it return the canonical path, but this is non-standard and won't work e.g. on a Mac. I have tested my patch on Ubuntu 16.04 with linuxbrew and will test it on a current Mac OS X El Capitan, as soon as possible (currently, there seems to be some network problem with homebrew). I would really be thankful, if you could consider my change, because we heavily use the brew system and would have to patch after each update otherwise. Thank you, Stephan
Author
|
Ok, now I could test it on OS X: Results: The error does not occur on this platform, but the modification anyway works -- and the bug on Ubuntu linuxbrew has been fixed. I don't have any Cygwin ready to test, so, sorry, cannot test that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Great tool, thank you! However, I would like to propose a patch, because we have a small problem with relative symlinks for the current tophat2.sh start script:
readlink returns the plain content of the symlink, which may be a relative path resolved from the directory, the link lives in, for example "../Cellar/tophat/2.1.1_1/bin/tophat2" in case of the brew system (homebrew or linuxbrew). The relative path is handled different by the existing tophat2.sh-script than by a shell resolving a symlink. The shell would resolve it relatively to the link's directory, the original tophat2.sh script tries to resolve it relatively to the current working directory, which usually fails. The proposed change will take care of this issue and set DIR to the real directory tophat2.sh lives in.
For Linux only, the readlink command supports a "-f" parameter making it return the canonical path, but this is non-standard and won't work e.g. on a Mac.
I have tested my patch on Ubuntu 16.04 with linuxbrew and will test it on a current Mac OS X El Capitan, as soon as possible (currently, there seems to be some network problem with homebrew).
I would really be thankful, if you could consider my change, because we heavily use the brew system and would have to patch after each update otherwise. Thank you,
Stephan