diff options
author | Geoff Leyland <geoff.leyland@incremental.co.nz> | 2015-12-22 14:47:50 +1300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-12-22 11:29:40 -0200 |
commit | 9fe6923d37a9e3b35428cfa631da60fdd6a89f95 (patch) | |
tree | cdc820099ae3447923e80849d56addba5311199b /src | |
parent | 619b8165186741e99d3274826fd95a6f546681be (diff) | |
download | luarocks-9fe6923d37a9e3b35428cfa631da60fdd6a89f95.tar.gz luarocks-9fe6923d37a9e3b35428cfa631da60fdd6a89f95.tar.bz2 luarocks-9fe6923d37a9e3b35428cfa631da60fdd6a89f95.zip |
Fix util.popen_read
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/util.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/luarocks/util.lua b/src/luarocks/util.lua index 8c4bd974..fc45c9f4 100644 --- a/src/luarocks/util.lua +++ b/src/luarocks/util.lua | |||
@@ -16,8 +16,8 @@ local unpack = unpack or table.unpack | |||
16 | -- @param spec string: "*l" by default, to read a single line. | 16 | -- @param spec string: "*l" by default, to read a single line. |
17 | -- May be used to read more, passing, for instance, "*a". | 17 | -- May be used to read more, passing, for instance, "*a". |
18 | -- @return string: the output of the program. | 18 | -- @return string: the output of the program. |
19 | function popen_read(cmd, spec) | 19 | function util.popen_read(cmd, spec) |
20 | local fd = io.open(cmd) | 20 | local fd = io.popen(cmd) |
21 | local out = fd:read(spec or "*l") | 21 | local out = fd:read(spec or "*l") |
22 | fd:close() | 22 | fd:close() |
23 | return out | 23 | return out |