mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-16 05:47:06 +09:00
avoid creating nil callback for JobSpawn (#3554)
This commit is contained in:
@@ -78,8 +78,10 @@ func JobSpawn(cmdName string, cmdArgs []string, onStdout, onStderr, onExit func(
|
|||||||
go func() {
|
go func() {
|
||||||
// Run the process in the background and create the onExit callback
|
// Run the process in the background and create the onExit callback
|
||||||
proc.Run()
|
proc.Run()
|
||||||
jobFunc := JobFunction{onExit, outbuf.String(), userargs}
|
if onExit != nil {
|
||||||
Jobs <- jobFunc
|
jobFunc := JobFunction{onExit, outbuf.String(), userargs}
|
||||||
|
Jobs <- jobFunc
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
return &Job{proc, stdin}
|
return &Job{proc, stdin}
|
||||||
|
|||||||
Reference in New Issue
Block a user