[ https://issues.apache.org/jira/browse/KAFKA-1508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rekha Joshi reassigned KAFKA-1508: ---------------------------------- Assignee: Rekha Joshi > Scripts Break When Path Has Spaces > ---------------------------------- > > Key: KAFKA-1508 > URL: https://issues.apache.org/jira/browse/KAFKA-1508 > Project: Kafka > Issue Type: Bug > Components: tools > Affects Versions: 0.8.1.1 > Environment: Any *nix flavor where the full path name to the Kafka > deployment contains spaces > Reporter: Tim Olson > Assignee: Rekha Joshi > Priority: Minor > > All the shell scripts in {{bin}} use the idom > {{$(dirname $0)}} > but this produces the error > {{usage: dirname path}} > if the path contains spaces. The correct way to get the dirname is to use: > {{"$(dirname "$0")"}} > and subsequently wrap the result in quotes when it is used. For example, the > file {{bin/kafka-run-class.sh}} should look like this starting line 23: > {code} > # BUGFIX: quotes added > base_dir="$(dirname "$0")/.." > # create logs directory > # BUGFIX: quotes added > LOG_DIR="$base_dir/logs" > if [ ! -d "$LOG_DIR" ]; then > # BUGFIX: quotes added around $LOG_DIR > mkdir "$LOG_DIR" > fi > # ... > # BUGFIX: quotes added > for file in "$base_dir/core/build/dependant-libs-${SCALA_VERSION}/*.jar"; > do > CLASSPATH=$CLASSPATH:"$file" > done > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)