lunarmodules / luafilesystem

LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution.
https://lunarmodules.github.io/luafilesystem/
MIT License
907 stars 293 forks source link

Why is luarocks saying : Error: unknown option '-e' when installing luacheck? #148

Closed HolterPhylo closed 3 years ago

HolterPhylo commented 3 years ago

Why is luarocks saying : Error: unknown option '-e' when...


Missing dependencies for luacheck 0.24.0-2:
argparse >= 0.6.0 (not installed)

luacheck 0.24.0-2 depends on lua >= 5.1 (5.3-1 provided by VM)
luacheck 0.24.0-2 depends on argparse >= 0.6.0 (not installed)
Installing https://luarocks.org/argparse-0.7.1-1.src.rock

argparse 0.7.1-1 depends on lua >= 5.1, < 5.5 (5.3-1 provided by VM)
argparse 0.7.1-1 is now installed in C:/Lua (license: MIT)

luacheck 0.24.0-2 depends on luafilesystem >= 1.6.3 (1.8.0-1 installed)
Usage: luarocks [-h] [--version] [--dev] [--server <server>]
[--only-server <server>] [--only-sources <url>]
[--namespace <namespace>] [--lua-dir <prefix>]
[--lua-version <ver>] [--tree <tree>] [--local] [--global]
[--verbose] [--timeout <seconds>] [--pin] [<command>] ...

Error: unknown option '-e'
Did you mean '-h'?
Usage: luarocks [-h] [--version] [--dev] [--server <server>]
[--only-server <server>] [--only-sources <url>]
[--namespace <namespace>] [--lua-dir <prefix>]
[--lua-version <ver>] [--tree <tree>] [--local] [--global]
[--verbose] [--timeout <seconds>] [--pin] [<command>] ...

Error: unknown option '-e'
Did you mean '-h'?
luacheck 0.24.0-2 is now installed in C:/Lua (license: MIT)```
Tieske commented 3 years ago

have you tried running the command with the --verbose option? That might show the culprit.

HolterPhylo commented 3 years ago

thanks, I'll try!

Did in cmd: luarocks --verbose install luacheck>log.txt

Searched log.txt for 'Error:' and also 'unknown', no match!

cmd windows shows:


Usage: luarocks [-h] [--version] [--dev] [--server <server>]
       [--only-server <server>] [--only-sources <url>]
       [--namespace <namespace>] [--lua-dir <prefix>]
       [--lua-version <ver>] [--tree <tree>] [--local] [--global]
       [--verbose] [--timeout <seconds>] [--pin] [<command>] ...

Error: unknown option '-e'
Did you mean '-h'?
Usage: luarocks [-h] [--version] [--dev] [--server <server>]
       [--only-server <server>] [--only-sources <url>]
       [--namespace <namespace>] [--lua-dir <prefix>]
       [--lua-version <ver>] [--tree <tree>] [--local] [--global]
       [--verbose] [--timeout <seconds>] [--pin] [<command>] ...

Error: unknown option '-e'
Did you mean '-h'?

C:\Users\xxxxx>```

So no extra information in log.txt due to --verbose.  

Any suggestion?  Is that a luarocks or a luacheck problem you think?
Tieske commented 3 years ago

I'd suspect it to be a parameter to call Lua itself.

The Lua executable can be used with -e to execute code before starting, eg.

lua -e "print [[hello-world]]"

Luarocks creates some wrappers that use this -e option iirc. Still seems like a LuaRocks problem to me.

HolterPhylo commented 3 years ago

Thanks, I'll check with luarocks people!