mirror of
https://github.com/zyedidia/micro.git
synced 2025-06-18 23:05:40 -04:00
avoid creating nil
callback for JobSpawn
(#3554)
Some checks are pending
Build and Test / test (1.17.x, macos-latest) (push) Waiting to run
Build and Test / test (1.17.x, ubuntu-latest) (push) Waiting to run
Build and Test / test (1.17.x, windows-latest) (push) Waiting to run
Build and Test / test (1.23.x, macos-latest) (push) Waiting to run
Build and Test / test (1.23.x, ubuntu-latest) (push) Waiting to run
Build and Test / test (1.23.x, windows-latest) (push) Waiting to run
Some checks are pending
Build and Test / test (1.17.x, macos-latest) (push) Waiting to run
Build and Test / test (1.17.x, ubuntu-latest) (push) Waiting to run
Build and Test / test (1.17.x, windows-latest) (push) Waiting to run
Build and Test / test (1.23.x, macos-latest) (push) Waiting to run
Build and Test / test (1.23.x, ubuntu-latest) (push) Waiting to run
Build and Test / test (1.23.x, windows-latest) (push) Waiting to run
This commit is contained in:
parent
56c1f75bad
commit
831e31d483
@ -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}
|
||||||
|
Loading…
Reference in New Issue
Block a user