You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run a job and analyze the return code to decide what to do. When I put a print() call in the on_exit callback, I see it prints twice and looks like different arguments are being supplied each time. Sometimes I get the code but other times I don't. Is this intended?
Example fn:
functionjob_test()
localJob=require'plenary.job'localjob=Job:new{
command="ls",
on_exit=function(...)
print(...)
end,
}
job:start()
job:shutdown()
end
It outputs:
table: 0x420071d0 nil nil
nil
If I had to guess, I'd say it's being called with self one of the times, but not the other.
The text was updated successfully, but these errors were encountered:
OK, I think I've fixed this with the latest commit.
I'd recommend using job:wait over job:shutdown though generally, since that's probably what you want to do (just guessing though, since I have no idea if that's what you're trying to actually do.
I am trying to run a job and analyze the return code to decide what to do. When I put a
print()
call in theon_exit
callback, I see it prints twice and looks like different arguments are being supplied each time. Sometimes I get the code but other times I don't. Is this intended?Example fn:
It outputs:
If I had to guess, I'd say it's being called with
self
one of the times, but not the other.The text was updated successfully, but these errors were encountered: