Skip to content

/usr/bin/luacheck doesn't run (hardcoded build path)

[root@test2 ~]# pacman -S luacheck
resolving dependencies...
looking for conflicting packages...

Packages (4) lua-5.4.6-3  lua-argparse-0.7.1-1  lua-filesystem-1.8.0-4  luacheck-1.2.0-1

Total Download Size:   0.47 MiB
Total Installed Size:  1.97 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 lua-5.4.6-3-x86_64                362.2 KiB   810 KiB/s 00:00 [##################################] 100%
 luacheck-1.2.0-1-any               93.5 KiB  1281 KiB/s 00:00 [##################################] 100%
 lua-argparse-0.7.1-1-any           13.9 KiB   199 KiB/s 00:00 [##################################] 100%
 lua-filesystem-1.8.0-4-x86_64       9.3 KiB   128 KiB/s 00:00 [##################################] 100%
 Total (4/4)                       478.9 KiB   445 KiB/s 00:01 [##################################] 100%
(4/4) checking keys in keyring                                 [##################################] 100%
(4/4) checking package integrity                               [##################################] 100%
(4/4) loading package files                                    [##################################] 100%
(4/4) checking for file conflicts                              [##################################] 100%
(4/4) checking available disk space                            [##################################] 100%
:: Processing package changes...
(1/4) installing lua                                           [##################################] 100%
(2/4) installing lua-filesystem                                [##################################] 100%
(3/4) installing lua-argparse                                  [##################################] 100%
(4/4) installing luacheck                                      [##################################] 100%
Optional dependencies for luacheck
    lua-lanes: for parallel checking
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[root@test2 ~]# luacheck
/usr/bin/lua5.4: cannot open /build/luacheck/pkg/luacheck/usr/lib/luarocks/rocks-5.4/luacheck/1.2.0-1/bin/luacheck: No such file or directory

Manually invoking the right path works:

[root@test2 ~]# lua5.4 /usr/lib/luarocks/rocks-5.4/luacheck/1.2.0-1/bin/luacheck
Usage: luacheck ([--config <config>] | [--no-config])
       ([--default-config <default_config>] | [--no-default-config])
       [-h] [-g] [-u] [-r] [-a] [-s] [--no-self] [--std <std>] [-c]
       [-d] [-t] [-m] [--max-line-length <length>]
       [--no-max-line-length] [--max-code-line-length <length>]
...
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information