https://bugs.winehq.org/show_bug.cgi?id=44132
Bug ID: 44132 Summary: Luajit’s os.execute() does not work well with quoted arguments Product: Wine Version: 2.19 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: cmd Assignee: wine-bugs@winehq.org Reporter: kp-pav@yandex.ru Distribution: ---
Created attachment 59873 --> https://bugs.winehq.org/attachment.cgi?id=59873 Compiled luajit. That was unpacked to C:\luajit.
With luajit installed to C:\luajit (cross-compiled with mingw as they do not provide downloadable binaries)
luajit -e "print(os.execute("\"C:\luajit\luajit\" -e \"print(1)\""))"
yields
Can't recognize 'C:\luajit\luajit" -e "print(1)' as an internal or external command, or batch script. 9009
. This is bad because this is actually how luarocks is creating directories: it runs `C: & cd … & "path\to\mkdir" -p "path\to\dir\to\create"` (note the spaces around `&` which do not work, but this is a separate issue).
Note that problem is additional pair of quotes:
luajit -e "print(os.execute("\"C:\luajit\luajit\" -e print(1)"))"
works just fine.
Wine version used is 32-bit wine-any-2.19 from Gentoo portage on a 64-bit multilib system, USE="X alsa cups fontconfig gecko gstreamer jpeg lcms mono ncurses nls opengl perl png realtime run-exes scanner ssl threads truetype udisks xml".