mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-23 05:35:44 -05:00
exec/cmd: flatten_shell_script(): specifically quote empty strings even when shell_quote is disabled
This commit is contained in:
parent
f6fb521c8a
commit
0353693025
1 changed files with 2 additions and 0 deletions
|
@ -38,6 +38,8 @@ def flatten_shell_script(script: Union[list[str], str], shell_quote_items: bool
|
|||
cmds = script
|
||||
if shell_quote_items:
|
||||
cmds = [shell_quote(i) for i in cmds]
|
||||
else:
|
||||
cmds = [(i if i != '' else '""') for i in cmds]
|
||||
script = " ".join(cmds)
|
||||
if wrap_in_shell_quote:
|
||||
script = shell_quote(script)
|
||||
|
|
Loading…
Add table
Reference in a new issue