Comparison

plugins/mod_version.lua @ 4793:eaa8991998d5

mod_version: Fix missing comma and correct prefix for util.pposix
author Kim Alvefur <zash@zash.se>
date Tue, 24 Apr 2012 21:37:20 +0200
parent 3483:443139c396c5
child 5776:bd0ff8ae98a8
comparison
equal deleted inserted replaced
4526:cdab466551bd 4793:eaa8991998d5
19 if not module:get_option("hide_os_type") then 19 if not module:get_option("hide_os_type") then
20 if os.getenv("WINDIR") then 20 if os.getenv("WINDIR") then
21 version = "Windows"; 21 version = "Windows";
22 else 22 else
23 local os_version_command = module:get_option("os_version_command"); 23 local os_version_command = module:get_option("os_version_command");
24 local ok pposix = pcall(require, "pposix"); 24 local ok, pposix = pcall(require, "util.pposix");
25 if not os_version_command and (ok and pposix and pposix.uname) then 25 if not os_version_command and (ok and pposix and pposix.uname) then
26 version = pposix.uname().sysname; 26 version = pposix.uname().sysname;
27 end 27 end
28 if not version then 28 if not version then
29 local uname = io.popen(os_version_command or "uname"); 29 local uname = io.popen(os_version_command or "uname");