[
https://issues.apache.org/jira/browse/PIG-4864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15235943#comment-15235943
]
Daniel Dai commented on PIG-4864:
---------------------------------
Would you mind upload a patch?
> pig binary does not resolve PIG_HOME correctly when called through symlink
> --------------------------------------------------------------------------
>
> Key: PIG-4864
> URL: https://issues.apache.org/jira/browse/PIG-4864
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.15.0
> Reporter: Savvas Savvides
>
> I installed pig in /usr/local/pig and made a symlink of
> /usr/local/pig/bin/pig to /usr/local/bin/pig
> When attempting to run pig I got the error "Cannot locate pig.jar. do 'ant
> jar', and try again". I tracked the error to be that PIG_HOME was not set
> correctly. The code that does that uses pwd -P which only works when the
> symlink is part of the directory structure.
> Proposed fix:
> $(dirname "$(readlink -f "$this")")
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)