From 575858a3709d03b6348add5721cd02e320b424bf Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 13 Mar 2019 18:50:33 -0400 Subject: Protect against cmd operands beginning with "-" --- (limited to 'lib/package.sh') diff --git a/lib/package.sh b/lib/package.sh index 0ade56a..d66d596 100644 --- a/lib/package.sh +++ b/lib/package.sh @@ -28,10 +28,10 @@ ob_init_package() local dir="${1}" shift 1 || _ob_abort - _OB_PACKAGE_DIR="$(cd "${dir}" && pwd)" + _OB_PACKAGE_DIR="$(cd -- "${dir}" && pwd)" if [ -r "${_OB_PACKAGE_DIR}/format" ]; then - case "$(cat "${_OB_PACKAGE_DIR}/format")" in + case "$(cat -- "${_OB_PACKAGE_DIR}/format")" in 2.0) _OB_PACKAGE_FORMAT='2' ;; -- cgit v0.9.1