From 3e00dc44772407fc4393a6e12020a267b356d9bd Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 11 Aug 2016 14:09:50 +0200 Subject: 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. --- scripts/vim-patch.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/vim-patch.sh') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 3997bd52b1..b552874c27 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -3,6 +3,8 @@ set -e set -u 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 VIM_SOURCE_DIR_DEFAULT="${NEOVIM_SOURCE_DIR}/.vim-src" -- cgit