HomeFreeBSD

SC2163: Exporting an expansion rather than a variable.

Description

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

Details

Provenance
matAuthored on
Parents
rP471268: SC2034: <some var> appears unused. Verify it or export it.
Branches
Unknown
Tags
Unknown