scripts/vim-patch.sh: use privileged mode (set -p)

Without this the "cd scripts/.." might change to another dir (since
CDPATH is looked at before a local path), and then NEOVIM_SOURCE_DIR
might end up being "/somewhere/else\n/somewhere/else" (since the "cd"
prints the dir already in that case).

Closes https://github.com/neovim/neovim/pull/5213.
This commit is contained in:
Daniel Hahler 2016-08-11 14:09:50 +02:00
parent add41dca98
commit 3e00dc4477

View File

@ -3,6 +3,8 @@
set -e set -e
set -u set -u
set -o pipefail set -o pipefail
# Use priviledged mode, which e.g. skips using CDPATH.
set -p
readonly NEOVIM_SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" readonly NEOVIM_SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
readonly VIM_SOURCE_DIR_DEFAULT="${NEOVIM_SOURCE_DIR}/.vim-src" readonly VIM_SOURCE_DIR_DEFAULT="${NEOVIM_SOURCE_DIR}/.vim-src"