Closed WantToLearnJapanese closed 2 months ago
Hi, I meet a problem with the
sbar.exec("sleep 5 && echo TEST", function(result)
print(result)
end)
and return nothing. I wonder what's wrong with it. Can you test if it return "TEST" or nothing plz? plus, I'm using lua 5.4.6. Does it matter?
@curiosusJR Sorry for the late reply.
I can't access the macOS right now.
But I am sure appending && echo 1
works. Since I actually used that for my scripts.
I am checking for the built-in display which yields empty string if it doesn't find, so I appended: grep -q 'Built-in' && echo 'true' || echo 'false'
works like a charm.
Should be fixed. Exit code is now additionally send to the callback function: https://github.com/FelixKratz/SbarLua/commit/5cfb488806006230712e87da74d8e767072c5c29
Currently, the simple workaround is appending
&& echo 1
to the\<cmd\>