From 2943e63b7a3222f1af2a777ed259a6fe2a321cde Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 05 Jul 2020 23:54:04 -0400 Subject: ob_init_package(): Defend against CDPATH in Bash Why does Bash insist on breaking standard things? --- (limited to 'lib') diff --git a/lib/package.sh b/lib/package.sh index df129c7..138609c 100644 --- a/lib/package.sh +++ b/lib/package.sh @@ -80,7 +80,7 @@ ob_init_package() local dir="${1}" shift 1 || _ob_abort - _ob_package_dir="$(cd -- "${dir}" && pwd)" + _ob_package_dir="$(unset CDPATH; cd -- "${dir}" && pwd)" _ob_package_format_full="$(cat -- "${_ob_package_dir}/format")" if [ -r "${_ob_package_dir}/format" ]; then -- cgit v0.9.1