fix(dap): don't close empty stdout stderr handle (#149)

Add nil check to closure of stdout stderr handle
This commit is contained in:
David Brouwer 2022-07-01 11:06:02 +02:00 committed by GitHub
parent 6e7410452f
commit ee39b539b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -349,9 +349,9 @@ M.run = function(...)
end)
end
stdout:close()
stderr:close()
handle:close()
_ = stdout and stdout:close()
_ = stderr and stderr:close()
_ = handle and handle:close()
stdout = nil
stderr = nil
handle = nil