diff options
author | mat <mat@FreeBSD.org> | 2018-06-02 00:20:39 +0800 |
---|---|---|
committer | mat <mat@FreeBSD.org> | 2018-06-02 00:20:39 +0800 |
commit | a838692f9980c24297dfa3197166f240f3e09fb0 (patch) | |
tree | 12f8e0ac5a27d99540f83c9fbce89ebda2cfa01f /Mk | |
parent | 5b1f0a13002c39ec1cd6bed45b09aa3bfc5d154a (diff) | |
download | freebsd-ports-gnome-a838692f9980c24297dfa3197166f240f3e09fb0.tar.gz freebsd-ports-gnome-a838692f9980c24297dfa3197166f240f3e09fb0.tar.zst freebsd-ports-gnome-a838692f9980c24297dfa3197166f240f3e09fb0.zip |
SC2163: Exporting an expansion rather than a variable.
export takes a variable name, but shellcheck has noticed that you give
it an expanded variable instead. The problematic code does not export
MYVAR but a variable called foo if any.
Add exception when using indirections where the variable to extract is
actually the value of the variable.
PR: 227109
Submitted by: mat
Sponsored by: Absolight
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Scripts/functions.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Mk/Scripts/functions.sh b/Mk/Scripts/functions.sh index 528c24a916ae..72ee5c3fe69e 100644 --- a/Mk/Scripts/functions.sh +++ b/Mk/Scripts/functions.sh @@ -197,6 +197,8 @@ export_ports_env() { value="$(eval echo \$${var})" if [ -n "${value}" ]; then + # shellcheck disable=SC2163 + # We want to export the variable which name is in var. export ${var} echo "export ${var}=\"${value}\"" fi |