From 4e34f47f9ed95477407425c5b25a779fac3eb9a7 Mon Sep 17 00:00:00 2001 From: rxi Date: Sun, 8 Apr 2018 16:06:33 +0100 Subject: [PATCH] Made lurker default to global `lume` before requiring --- lurker.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lurker.lua b/lurker.lua index b036e03..4cd8f0f 100644 --- a/lurker.lua +++ b/lurker.lua @@ -7,8 +7,9 @@ -- under the terms of the MIT license. See LICENSE for details. -- --- Assumes lume is in the same directory as this file -local lume = require((...):gsub("[^/.\\]+$", "lume")) +-- Assumes lume is in the same directory as this file if it does not exist +-- as a global +local lume = rawget(_G, "lume") or require((...):gsub("[^/.\\]+$", "lume")) local lurker = { _version = "1.0.1" } @@ -258,3 +259,4 @@ end return lurker.init() +