aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--files.lua5
-rw-r--r--files.moon3
3 files changed, 4 insertions, 6 deletions
diff --git a/README.md b/README.md
index 546e8ce..2bfebcb 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ revolving around natural language rule-making and self modification.
## Dependencies
-Nomsu's only dependencies are [Lua 5.2 or later](https://www.lua.org/) (tested with version 5.2.4) (or [Luajit](http://luajit.org/) (tested with version 2.1.0)) and [LPEG](http://www.inf.puc-rio.br/~roberto/lpeg/) (`luarocks install lpeg`). Nomsu's compiler was written in [Moonscript](http://moonscript.org/), but all of the .moon files have been compiled into lua for convenience, so Moonscript is not a dependency.
+Nomsu's only dependencies are [Lua 5.1 or later](https://www.lua.org/) or [Luajit](http://luajit.org/) and [LPEG](http://www.inf.puc-rio.br/~roberto/lpeg/) (`luarocks install lpeg`). Nomsu's compiler was written in [Moonscript](http://moonscript.org/), but all of the .moon files have been compiled into lua for convenience, so Moonscript is not a dependency.
## Usage
diff --git a/files.lua b/files.lua
index 130a880..365cb96 100644
--- a/files.lua
+++ b/files.lua
@@ -48,7 +48,7 @@ iterate_single = function(item, prev)
end
end
local ok, lfs = pcall(require, "lfs")
-if ok then
+if ok and false then
files.walk = function(path)
local browse
browse = function(filename)
@@ -83,8 +83,7 @@ if ok then
end)
end
else
- local ret = os.execute('find . -maxdepth 0')
- if not (ret == true or ret == 0) then
+ if io.popen('find . -maxdepth 0'):close() then
error("Could not find 'luafilesystem' module and couldn't run system command `find` (this might happen on Windows). Please install `luafilesystem` (which can be found at: http://keplerproject.github.io/luafilesystem/ or `luarocks install luafilesystem`)", 0)
end
files.walk = function(path)
diff --git a/files.moon b/files.moon
index e873c1d..5422651 100644
--- a/files.moon
+++ b/files.moon
@@ -53,8 +53,7 @@ if ok
break if browse(nomsupath.."/"..path)
return nil
else
- ret = os.execute('find . -maxdepth 0')
- unless ret == true or ret == 0
+ if io.popen('find . -maxdepth 0')\close!
error "Could not find 'luafilesystem' module and couldn't run system command `find` (this might happen on Windows). Please install `luafilesystem` (which can be found at: http://keplerproject.github.io/luafilesystem/ or `luarocks install luafilesystem`)", 0
files.walk = (path)->