You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Marshall McMullen (JIRA)" <ji...@apache.org> on 2013/06/25 19:59:22 UTC

[jira] [Commented] (ZOOKEEPER-1538) Improve space handling in zkServer.sh and zkEnv.sh

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13693209#comment-13693209 ] 

Marshall McMullen commented on ZOOKEEPER-1538:
----------------------------------------------

This fix is incorrect. It assumes the shell is bash since it uses bash array construction, e.g.:

 96   LIBPATH=("${ZOOKEEPER_PREFIX}"/share/zookeeper/*.jar)

This does NOT work if /bin/sh points to /bin/dash as it does on Ubuntu. 

It fails as so:

zkEnv.sh: 96: zkEnv.sh: Syntax error: "(" unexpected (expecting "fi")                                                                                                                                                                                              


If I change the shebang at the top to use "/bin/bash" instead of "/bin/sh" it works as expected. I don't know the full details of why using a bash array was chosen as the solution but I don't think it is the right way to deal with spaces in these paths...

I will open a separate jira and assign to Andrew Ferguson.
                
> Improve space handling in zkServer.sh and zkEnv.sh
> --------------------------------------------------
>
>                 Key: ZOOKEEPER-1538
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1538
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.4.3
>            Reporter: Andrew Ferguson
>            Assignee: Andrew Ferguson
>            Priority: Trivial
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1538.patch
>
>
> Running `bin/zkServer.sh start` from a freshly-built copy of trunk fails if the source code is checked-out to a directory with spaces in the name. I'll include a small fix to fix this problem.
> thanks!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira