diff options
author | Kousuke Saruta <sarutak@oss.nttdata.co.jp> | 2014-10-24 13:04:35 -0700 |
---|---|---|
committer | Andrew Or <andrew@databricks.com> | 2014-10-24 13:04:35 -0700 |
commit | 30ea2868e7afbec20bfc83818249b6d2d7dc6aec (patch) | |
tree | d491d387fd12bcd0dd296cfe2ae9f44bfcc99814 /sbin/spark-config.sh | |
parent | 7aacb7bfad4ec73fd8f18555c72ef6962c14358f (diff) | |
download | spark-30ea2868e7afbec20bfc83818249b6d2d7dc6aec.tar.gz spark-30ea2868e7afbec20bfc83818249b6d2d7dc6aec.tar.bz2 spark-30ea2868e7afbec20bfc83818249b6d2d7dc6aec.zip |
[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 <sarutak@oss.nttdata.co.jp>
Closes #2930 from sarutak/SPARK-4076 and squashes the following commits:
32a0370 [Kousuke Saruta] Fixed wrong parameter expansion
Diffstat (limited to 'sbin/spark-config.sh')
-rwxr-xr-x | sbin/spark-config.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/spark-config.sh b/sbin/spark-config.sh index 1d154e62ed..b0361d72d3 100755 --- a/sbin/spark-config.sh +++ b/sbin/spark-config.sh @@ -20,7 +20,7 @@ # also should not be passed any arguments, since we need original $* # resolve links - $0 may be a softlink -this="${BASH_SOURCE-$0}" +this="${BASH_SOURCE:-$0}" common_bin="$(cd -P -- "$(dirname -- "$this")" && pwd -P)" script="$(basename -- "$this")" this="$common_bin/$script" |