Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install/run on Windows 10 #715

Open
SauceChord opened this issue Apr 10, 2023 · 3 comments
Open

Can't install/run on Windows 10 #715

SauceChord opened this issue Apr 10, 2023 · 3 comments

Comments

@SauceChord
Copy link

I'm having problems running busted on Windows 10. Built Lua 5.4 (5.4.4?).
There exists a "busted" file, but I don't see how that's going to execute.
Also there's this Error: unknown option '-e' that shows up in the output?
In the bin directory there's only one file, busted

PS E:\repos-ext\busted> luarocks remove busted --force
Checking stability of dependencies in the absence of
busted scm-1...

Removing busted scm-1...
Removal successful.
PS E:\repos-ext\busted> luarocks make

busted scm-1 depends on lua >= 5.1 (5.4-1 provided by VM)
busted scm-1 depends on luasystem >= 0.2.0 (0.2.1-0 installed)
busted scm-1 depends on dkjson >= 2.1.0 (2.6-1 installed)
busted scm-1 depends on say >= 1.4-1 (1.4.1-3 installed)
busted scm-1 depends on luassert >= 1.9.0-1 (1.9.0-1 installed)
busted scm-1 depends on lua-term >= 0.1 (0.7-1 installed)
busted scm-1 depends on penlight >= 1.3.2 (1.13.1-1 installed)
busted scm-1 depends on mediator_lua >= 1.1.1 (1.1.2-0 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]
       [--no-project] [--verbose] [--timeout <seconds>] [<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]
       [--no-project] [--verbose] [--timeout <seconds>] [<command>]
       ...

Error: unknown option '-e'
Did you mean '-h'?
busted scm-1 is now installed in C:\Users\SauceChord\AppData\Roaming/luarocks (license: MIT <http://opensource.org/licenses/MIT>)

PS E:\repos-ext\busted> busted spec
busted : The term 'busted' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ busted spec
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (busted:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
@Tieske
Copy link
Member

Tieske commented Apr 10, 2023

I think this is a LuaRocks problem. The -e flag is probably targetted at lua.exe and not at luarocks, since the latter doesn't know it.

@Tieske
Copy link
Member

Tieske commented Apr 10, 2023

Could it be this issue; luarocks/luarocks#1287 ?

@SauceChord
Copy link
Author

SauceChord commented Apr 13, 2023

I don't know but I got it solved by using scoop.sh to install luarocks and then install busted via luarocks thanks to another issue I found in their repo.

luarocks/luarocks#1501

So the steps I did (plus I guess since before installing a compiler for building lua from source)

  • Install scoop.sh via powershell
    • Set-ExecutionPolicy RemoteSigned -Scope CurrentUser Optional: Needed to run a remote script the first time
    • irm get.scoop.sh | iex
  • scoop install luarocks in powershell to install luarocks
  • luarocks install busted in powershell to install busted
  • Restart VSCode if it was open and open its terminal
  • busted in VSCode terminal. Busted shows garbage text.
  • chcp 65001 in VSCode terminal to change code page to UTF8
  • busted in VSCode terminal. Busted shows clean text minus colors that I had on linux in wmware as I was testing.
  • Super happy!

@SauceChord SauceChord changed the title Can't install/run cleanly Can't install/run on Windows 10 Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants