From 04f8e1e2b542c5a524ac8ab5e95f427bfe5a2de7 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 10 Sep 2012 12:46:50 -0700 Subject: use(): use set -f and handle IFS --- bin/phase-helpers.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'bin/phase-helpers.sh') diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index 18877f059..bb5e057a7 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -215,11 +215,15 @@ use() { "in IUSE for ${CATEGORY}/${PF}" fi + local IFS=$' \t\n' prev_shopts=$- ret + set -f if has ${u} ${USE} ; then - return ${found} + ret=${found} else - return $((!found)) + ret=$((!found)) fi + [[ ${prev_shopts} == *f* ]] || set +f + return ${ret} } use_with() { -- cgit v1.2.3-1-g7c22