proxypoke/i3ipc

init() function fails when i3 is not available

Opened this issue · 0 comments

fd0 commented

When the i3ipc library is imported, the init() function is run, regardless whether the library is used or not. This causes unwanted side-effects in environments where i3 is not available, e.g. when running integration tests on Travis:

2015/10/04 14:58:34 Can't get i3 socket. Please make sure i3 is running. exec: "i3": executable file not found in $PATH.
FATAL command "test" failed: exit status 1

There is currently no way to disable this behavior, please move the code from the init function to another function so that it is not run unless the library is used.