aboutsummaryrefslogtreecommitdiff
path: root/nomsu.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-07-24 15:08:44 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-07-24 15:09:55 -0700
commitb6c99c56a1f49a9230b65200a5a016173038857c (patch)
treebfe893f8c746fc0ab6f8a84e93eb42bf762b3b63 /nomsu.moon
parent3cf97066be82a3a3405246b7c915bac8773e6004 (diff)
Updated package.nomsupath behavior to first search the installed
locations, *then* search the current directory. This makes the system `nomsu` run properly, even if the local directory has a broken file that has the same name as a nomsu file.
Diffstat (limited to 'nomsu.moon')
-rwxr-xr-xnomsu.moon4
1 files changed, 3 insertions, 1 deletions
diff --git a/nomsu.moon b/nomsu.moon
index 71ab68d..fe0b777 100755
--- a/nomsu.moon
+++ b/nomsu.moon
@@ -5,7 +5,9 @@ if NOMSU_VERSION and NOMSU_PREFIX
partial_vers = [table.concat(ver_bits,'.',1,i) for i=#ver_bits,1,-1]
package.path = table.concat(["#{NOMSU_PREFIX}/share/nomsu/#{v}/?.lua" for v in *partial_vers],";")..";"..package.path
package.cpath = table.concat(["#{NOMSU_PREFIX}/lib/nomsu/#{v}/?.so" for v in *partial_vers],";")..";"..package.cpath
- package.nomsupath = table.concat(["#{NOMSU_PREFIX}/share/nomsu/#{v}" for v in *partial_vers],";")
+ package.nomsupath = table.concat(["#{NOMSU_PREFIX}/share/nomsu/#{v}" for v in *partial_vers],";")..";."
+else
+ package.nomsupath = "."
EXIT_SUCCESS, EXIT_FAILURE = 0, 1
usage = [=[