Eli Schwartz <[email protected]> writes:

> On 1/27/26 10:01 AM, James Le Cuirot wrote:
>
>>>> +          # Assume that Wine can do its own CPU emulation.
>>>> +          install -m0755 /dev/stdin "${SCRIPT}" <<-EOF || die
>>>
>>> (What about my '-' question?)
>>>
>>>> +                  #!/bin/sh
>>>> +                  SANDBOX_ON=0 LD_PRELOAD= 
>>>> WINEPATH="\${WINEPATH}\${WINEPATH+;};${winepath//\//\\}" exec wine "\${@}"
>>>
>>> shellcheck sez:
>>> SC3060 (warning): In POSIX sh, string replacement is undefined.
>> 
>> I think shellcheck iz wrong. The replacement happens in the Bash context, not
>> the /bin/sh context.
>
>
> I recommend assuming by default that shellcheck is always wrong.

That's what I do. I looked at first, was suspicious, and then ran it.

> But also, install a package and then run shellcheck on the installed file --
> don't even *try* to run shellcheck on strings of shell embedded in other
> shell scripts

.. but I missed that it's evaluated in the bash context instead.

Attachment: signature.asc
Description: PGP signature

Reply via email to