Kaynağa Gözat

fix some code style

ruki 4 yıl önce
ebeveyn
işleme
39003b40b8
1 değiştirilmiş dosya ile 2 ekleme ve 6 silme
  1. 2 6
      packages/p/postgresql/xmake.lua

+ 2 - 6
packages/p/postgresql/xmake.lua

@@ -27,19 +27,17 @@ package("postgresql")
             end
 
             -- find programs
-            local binfile = find_program("postgres", {pathes = {"$(env PATH)"}})
+            local binfile = find_program("postgres", {paths = os.getenv("PATH")})
             if binfile then
                 local packagedir = path.directory(path.directory(binfile))
                 table.insert(paths, packagedir)
                 package:addenv("PATH", path.join(packagedir, "bin"))
             end
 
-            local result = {links = {}, linkdirs = {}, includedirs = {}, libfiles = {}}
-            
             -- find library
+            local result = {links = {}, linkdirs = {}, includedirs = {}, libfiles = {}}
             local libname = (package:is_plat("windows") and "libpq" or "pq")
             local linkinfo = find_library(libname, paths, {suffixes = "lib"})
-            print(linkinfo)
             if linkinfo then
                 table.insert(result.linkdirs, linkinfo.linkdir)
                 table.insert(result.links, libname)
@@ -58,8 +56,6 @@ package("postgresql")
             if path then
                 table.insert(result.includedirs, path)
             end
-
-            -- ok?
             if #result.includedirs > 0 and #result.linkdirs > 0 then
                 return result
             end