Repository: spark
Updated Branches:
  refs/heads/branch-1.1 926f8ca53 -> 386fc46bc


[SPARK-4076] Parameter expansion in spark-config is wrong

In sbin/spark-config.sh, parameter expansion is used to extract source root as 
follows.

    this="${BASH_SOURCE-$0}"

I think, the parameter expansion should be ":" instead of "".
If we use "-" and BASH_SOURCE="", (empty character is set, not unset),
"" (empty character) is set to $this.

Author: Kousuke Saruta <saru...@oss.nttdata.co.jp>

Closes #2930 from sarutak/SPARK-4076 and squashes the following commits:

32a0370 [Kousuke Saruta] Fixed wrong parameter expansion

(cherry picked from commit 30ea2868e7afbec20bfc83818249b6d2d7dc6aec)
Signed-off-by: Andrew Or <and...@databricks.com>

Conflicts:
        sbin/spark-config.sh


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/386fc46b
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/386fc46b
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/386fc46b

Branch: refs/heads/branch-1.1
Commit: 386fc46bc039714fdfcf3db679f689287f8ef836
Parents: 926f8ca
Author: Kousuke Saruta <saru...@oss.nttdata.co.jp>
Authored: Fri Oct 24 13:04:35 2014 -0700
Committer: Andrew Or <and...@databricks.com>
Committed: Fri Oct 24 13:05:47 2014 -0700

----------------------------------------------------------------------
 sbin/spark-config.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/386fc46b/sbin/spark-config.sh
----------------------------------------------------------------------
diff --git a/sbin/spark-config.sh b/sbin/spark-config.sh
index 396c729..62f9b30 100755
--- a/sbin/spark-config.sh
+++ b/sbin/spark-config.sh
@@ -20,8 +20,8 @@
 # also should not be passed any arguments, since we need original $*
 
 # resolve links - $0 may be a softlink
-this="${BASH_SOURCE-$0}"
-common_bin=$(cd -P -- "$(dirname -- "$this")" && pwd -P)
+this="${BASH_SOURCE:-$0}"
+common_bin="$(cd -P -- "$(dirname -- "$this")" && pwd -P)"
 script="$(basename -- "$this")"
 this="$common_bin/$script"
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to