Open
Description
Description / Steps to reproduce the issue
install lua and luarocks ucrt64
run luarocks install luasocket
the error will be:
The system cannot find the path specified.
The system cannot find the path specified.
Error: Current directory does not exist. Please run LuaRocks from an existing directory.
looking inside the luarocks script:
#!C:/msys64/ucrt64/bin/lua.exe
package.loaded["luarocks.core.hardcoded"] = { SYSCONFDIR = [[C:/msys64/ucrt64/etc/luarocks]] }
package.path=[[C:/msys64/ucrt64/share/lua/5.4/?.lua;]] .. package.path
local list = package.searchers or package.loaders; table.insert(list, 1, function(name) if name:match("^luarocks%.") then return loadfile([[C:/msys64/ucrt64/share/lua/5.4/]] .. name:gsub([[%.]], [[/]]) .. [[.lua]]) end end)
same thing for luarocks-admin
besides running luarocks from a cmd.exe or like git bash it doesn't report that error. (but it will fail after when trying to compile)
so it might be something with msys2?
NOTE: I did not have a fresh msys2 install, but an upgraded one if it matters...
Expected behavior
luarocks
should produce an output like:
$ luarocks
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]
[--no-project] [--force-lock] [--verbose] [--timeout <seconds>]
[<command>] ...
LuaRocks 3.11.1, the Lua package manager
C:/msys64/ucrt64/bin/luarocks - LuaRocks main command-line interface
Options:
-h, --help Show this help message and exit.
--version Show version info and exit.
--dev Enable the sub-repositories in rocks servers for
rockspecs of in-development versions.
--server <server> Fetch rocks/rockspecs from this server (takes priority
over config file).
--only-server <server>
Fetch rocks/rockspecs from this server only (overrides
any entries in the config file).
--only-sources <url> Restrict downloads to paths matching the given URL.
--namespace <namespace>
Specify the rocks server namespace to use.
--lua-dir <prefix> Which Lua installation to use.
--lua-version <ver> Which Lua version to use.
--tree <tree> Which tree to operate on.
--local Use the tree in the user's home directory.
To enable it, see 'C:/msys64/ucrt64/bin/luarocks help
path'.
--global Use the system tree when `local_by_default` is `true`.
--no-project Do not use project tree even if running from a project
folder.
--force-lock Attempt to overwrite the lock for commands that require
exclusive access, such as 'install'
--verbose Display verbose output of commands executed.
--timeout <seconds> Timeout on network operations, in seconds.
0 means no timeout (wait forever). Default is 30.
Commands:
help Show help for commands.
completion Output a shell completion script.
build Build/compile a rock.
config Query information about the LuaRocks configuration.
doc Show documentation for an installed rock.
download Download a specific rock file from a rocks server.
init Initialize a directory for a Lua project using
LuaRocks.
install Install a rock.
lint Check syntax of a rockspec.
list List currently installed rocks.
make Compile package in current directory using a rockspec.
new_version Auto-write a rockspec for a new version of a rock.
pack Create a rock, packing sources or binaries.
path Return the currently configured package path.
purge Remove all installed rocks from a tree.
remove Uninstall a rock.
search Query the LuaRocks servers.
show Show information about an installed rock.
test Run the test suite in the current directory.
unpack Unpack the contents of a rock.
upload Upload a rockspec to the public rocks repository.
which Tell which file corresponds to a given module name.
write_rockspec Write a template for a rockspec file.
Variables:
Variables from the "variables" table of the configuration file can be
overridden with VAR=VALUE assignments.
Configuration:
Lua:
Version : 5.4
LUA : C:/msys64/ucrt64\bin\lua.exe (ok)
LUA_INCDIR : C:/msys64/ucrt64/include (ok)
LUA_LIBDIR : C:\msys64\ucrt64\bin (ok)
Configuration files:
System : C:\msys64\ucrt64\etc\luarocks\config-5.4.lua (ok)
User : C:\Users\user\.luarocks\config-5.4.lua (not found)
Rocks trees in use:
C:\Users\user\.luarocks ("user")
C:\msys64\ucrt64 ("system")
Actual behavior
instead it produces an error:
$ luarocks
The system cannot find the path specified.
The system cannot find the path specified.
Error: Current directory does not exist. Please run LuaRocks from an existing directory.
Verification
- I have verified that my MSYS2 is up-to-date before submitting the report (see https://www.msys2.org/docs/updating/)
Windows Version
MSYS_NT-10.0-26100
MINGW environments affected
- MINGW64
- MINGW32
- UCRT64
- CLANG64
- CLANGARM64
Are you willing to submit a PR?
yes, but i don't have a clue at the moment what coudl be the error