I wanted to try testing Raku code on Windows. I managed to get Windows 11 set up on VirtualBox and the Raku binary installed and I can execute scripts.
However, I cannot seem to get the simplest run
command to do anything without returning an error:
run('ls');
results in:
The spawned command 'ls' exited unsuccessfully (exit code: 1, signal: 0)
in block <unit> at .\test.txt line 5
I also tried with dir
command, but had the same problem.
There is no ls
program on Windows by default, and dir
is not an executable that can be run, but rather a Windows command shell built-in. You could try using shell
instead of run
, or instead try something like:
run 'cmd.exe', '/c', 'dir'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With