os.popen not included on OS X

Issue #461 invalid
Mathias Haimerl created an issue

Hi @ll,

i encountered a Problem on OS X which is already discussed here: https://love2d.org/forums/viewtopic.php?f=5&t=9479&start=10

But i installed LUA 5.1 using MacPorts and here, it does work:

print(io.popen('uname -a','r'):read('*l')); Darwin haimimac.local 11.4.0 Darwin Kernel Version 11.4.0: Mon Apr 9 19:32:15 PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64

Did you forget to enable it for the Mac build?

Currently I have no way to enable my os detection on mac... maybe this is also a way of os detection ^^

Comments (2)

  1. Alex Szpakowski

    For OS detection you can use the love._os string (returns "OS X", "Windows", or "Linux"), assuming LÖVE 0.8.0+

  2. Matthias Richter

    As written in the forum thread, io.popen is not available on all platforms. This is a restriction of Lua, not of LÖVE.

  3. Log in to comment