Mercurial Hosting > luan
diff src/luan/host/init.luan @ 1611:f67f972bd648
make postgres.luan optional
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 15 May 2021 17:24:07 -0600 |
parents | 219f2b937f2b |
children | cf9dfead83a3 |
line wrap: on
line diff
--- a/src/luan/host/init.luan Thu May 13 17:26:34 2021 -0600 +++ b/src/luan/host/init.luan Sat May 15 17:24:07 2021 -0600 @@ -1,6 +1,7 @@ local Luan = require "luan:Luan.luan" local error = Luan.error local do_file = Luan.do_file or error() +local Package = require "luan:Package.luan" local String = require "luan:String.luan" local gsub = String.gsub or error() local Number = require "luan:Number.luan" @@ -72,11 +73,10 @@ local Logging = require "luan:logging/Logging.luan" local logger = Logging.logger "init" -local fn = Luan.load_file("file:postgres.luan") or error() -local pg = fn() +local pg = Package.load("file:postgres.luan") function Hosted.postgres_spec() - if pg == nil then + if pg == false then return nil end local spec = {