summaryrefslogtreecommitdiff
path: root/Mk/Scripts/functions.sh
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2018-06-08 09:26:20 +0000
committerMathieu Arnold <mat@FreeBSD.org>2018-06-08 09:26:20 +0000
commit258800dd7b7340760c6b0be41ef4537c4b1cc338 (patch)
tree330da2256db9a69a85c90ea422db8ab9d0154f69 /Mk/Scripts/functions.sh
parent- Add LICENSE (diff)
SC2046: Quote this to prevent word splitting.
When command expansions are unquoted, word splitting and globbing will occur. This often manifests itself by breaking when filenames contain spaces. Trying to fix it by adding quotes or escapes to the data will not work. Instead, quote the command substitution itself. If the command substitution outputs multiple pieces of data, use a loop instead. Add an exception when using set -- where splitting is intended. PR: 227109 Submitted by: mat Exp-run by: antoine Sponsored by: Absolight
Diffstat (limited to 'Mk/Scripts/functions.sh')
-rw-r--r--Mk/Scripts/functions.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/Mk/Scripts/functions.sh b/Mk/Scripts/functions.sh
index 72ee5c3fe69e..20affc692b03 100644
--- a/Mk/Scripts/functions.sh
+++ b/Mk/Scripts/functions.sh
@@ -188,8 +188,8 @@ export_ports_env() {
done
# Bring in all the vars, but not empty ones.
- eval $(${MAKE} -f ${PORTSDIR}/Mk/bsd.port.mk ${make_cmd} \
- USES="${uses}" | grep -v '=$' | sed -e 's,\\ $,,')
+ eval "$(${MAKE} -f ${PORTSDIR}/Mk/bsd.port.mk ${make_cmd} \
+ USES="${uses}" | grep -v '=$' | sed -e 's,\\ $,,')"
for var in ${export_vars}; do
# Export and display non-empty ones. This is not redundant
# with above since we're looping on all vars here; do not