I am using the minted package, which requires the -shell-escape flag during compilation.
I have tried adding various forms of the flag (e.g., shell-escape, -shell-escape, $shell-escape, --shell-escape) in the “工具配置 (Tool Configuration?)” dialog -- one of my attempt as shown in the screenshot below. However, I still receive the error:
! Package minted Error: You must invoke LaTeX with the -shell-escape flag.

When I compile manually using the command:
lualatex -shell-escape "xxx.tex"
the compilation succeeds. This suggests that the issue is related to how the flag is being added in TeXworks, not the flag itself.
Could someone please advise on the correct way to add the -shell-escape flag in TeXworks?