[ https://issues.apache.org/jira/browse/PIG-1293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846565#action_12846565 ]
Allen Wittenauer commented on PIG-1293: --------------------------------------- Let's get a bit more explicit: $ cd /tmp $ which pig /export/apps/hadoop/bin/pig $ bash -x pig + cygwin=false + case "`uname`" in ++ uname + debug=false + this=pig + '[' -h pig ']' ++ dirname pig + bin=. ++ basename pig + script=pig ++ unset CDPATH ++ cd . ++ pwd + bin=/tmp + this=/tmp/pig ++ dirname /tmp/pig + export PIG_HOME=/tmp/.. This is clearly wrong. After applying the fix: + cygwin=false + case "`uname`" in ++ uname + debug=false + this=/export/apps/hadoop/bin/pig + '[' -h /export/apps/hadoop/bin/pig ']' ++ ls -ld /export/apps/hadoop/bin/pig + ls='lrwxrwxrwx 1 root root 24 Mar 5 09:05 /export/apps/hadoop/bin/pig -> /export/apps/pig/bin/pig' ++ expr 'lrwxrwxrwx 1 root root 24 Mar 5 09:05 /export/apps/hadoop/bin/pig -> /export/apps/pig/bin/pig' : '.*-> \(.*\)$' + link=/export/apps/pig/bin/pig + expr /export/apps/pig/bin/pig : '.*/.*' + this=/export/apps/pig/bin/pig + '[' -h /export/apps/pig/bin/pig ']' ++ dirname /export/apps/pig/bin/pig + bin=/export/apps/pig/bin ++ basename /export/apps/pig/bin/pig + script=pig ++ unset CDPATH ++ cd /export/apps/pig/bin ++ pwd + bin=/export/apps/pig/bin + this=/export/apps/pig/bin/pig ++ dirname /export/apps/pig/bin/pig + export PIG_HOME=/export/apps/pig/bin/.. This is correct, even dealing with the symlink in the process, as expected. > pig wrapper script tends to fail if pig is in the path and PIG_HOME isn't set > ----------------------------------------------------------------------------- > > Key: PIG-1293 > URL: https://issues.apache.org/jira/browse/PIG-1293 > Project: Pig > Issue Type: Bug > Affects Versions: 0.6.0 > Reporter: Allen Wittenauer > Attachments: PIG-1293.txt > > > If PIG_HOME isn't set and pig is in the path, the pig wrapper script can't > find its home. Setting PIG_HOME makes it hard to support multiple versions > of pig. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.