Don't throw error if job callback doesn't exist

Closes #953
This commit is contained in:
Zachary Yedidia
2018-01-21 16:31:13 -05:00
parent 10b8fb7b26
commit 63299df4b9

View File

@@ -124,7 +124,7 @@ func LuaFunctionComplete(function string) func(string) []string {
func LuaFunctionJob(function string) func(string, ...string) {
return func(output string, args ...string) {
_, err := Call(function, unpack(append([]string{output}, args...))...)
if err != nil {
if err != nil && !strings.HasPrefix(err.Error(), "function does not exist") {
TermMessage(err)
}
}