gamesys / moonshine

A lightweight Lua VM for the browser
http://moonshinejs.org
MIT License
501 stars 35 forks source link

distil can't handle spaces in filename #35

Open greay opened 8 years ago

greay commented 8 years ago

When supplying a directory, distil will choke on any files in that directory that contain spaces. So for example running "moonshine distil -d target lua" where lua has a file "background tests.lua" will result in the error:

$ moonshine distil -d target lua
/usr/local/lib/node_modules/moonshine/bin/commands/distil.js:164
        if (errPart[1] != 'luac') throw err;
                                  ^

Error: Command failed: /bin/sh -c luac -o lua/backgrounds test.lua.moonshine.luac lua/backgrounds test.lua
luac: cannot open test.lua.moonshine.luac: No such file or directory
paulcuth commented 8 years ago

Hi, could you provide a description? In which way are you using the distillery? Any error messages?

If you are using it via the command line, you'll need to wrap filenames with spaces in quotes--but that is normal for all command line expressions.

greay commented 8 years ago

Sorry 'bout that. Updated. The problem is, in this situation, I'm not able to wrap the filenames in quotes because I don't supply them to the command line utility.