File tree 2 files changed +35
-14
lines changed
2 files changed +35
-14
lines changed Original file line number Diff line number Diff line change 49
49
50
50
(fn destroy []
51
51
;; https://teukka.tech/vimloop.html
52
- (stdout:read_stop )
53
- (stderr:read_stop )
54
- (stdout:close )
55
- (stderr:close )
56
- (stdin:close )
52
+ (pcall # ( stdout:read_stop ) )
53
+ (pcall # ( stderr:read_stop ) )
54
+ (pcall # ( stdout:close ) )
55
+ (pcall # ( stderr:close ) )
56
+ (pcall # ( stdin:close ) )
57
57
(when repl.handle
58
- (uv.process_kill repl.handle )
59
- (repl.handle :close))
58
+ (pcall # ( uv.process_kill repl.handle ) )
59
+ (pcall # ( repl.handle :close) ))
60
60
nil )
61
61
62
62
(fn on - exit [code signal ]
Original file line number Diff line number Diff line change 108
108
local stderr = uv .new_pipe (false )
109
109
local repl = {current = nil , queue = {}}
110
110
local function destroy ()
111
- stdout :read_stop ()
112
- stderr :read_stop ()
113
- stdout :close ()
114
- stderr :close ()
115
- stdin :close ()
111
+ local function _2_ ()
112
+ return stdout :read_stop ()
113
+ end
114
+ pcall (_2_ )
115
+ local function _3_ ()
116
+ return stderr :read_stop ()
117
+ end
118
+ pcall (_3_ )
119
+ local function _4_ ()
120
+ return stdout :close ()
121
+ end
122
+ pcall (_4_ )
123
+ local function _5_ ()
124
+ return stderr :close ()
125
+ end
126
+ pcall (_5_ )
127
+ local function _6_ ()
128
+ return stdin :close ()
129
+ end
130
+ pcall (_6_ )
116
131
if repl .handle then
117
- uv .process_kill (repl .handle )
118
- do end (repl .handle ):close ()
132
+ local function _7_ ()
133
+ return uv .process_kill (repl .handle )
134
+ end
135
+ pcall (_7_ )
136
+ local function _8_ ()
137
+ return (repl .handle ):close ()
138
+ end
139
+ pcall (_8_ )
119
140
end
120
141
return nil
121
142
end
You can’t perform that action at this time.
0 commit comments