From fbffa0c2b43ff20ccba7b939d4a1a42d18c6c7eb Mon Sep 17 00:00:00 2001 From: Leo Conforti Date: Fri, 20 Oct 2023 10:52:40 -0500 Subject: [PATCH] Update ssh.js --- lib/ssh.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ssh.js b/lib/ssh.js index 8d562c9..2d44564 100644 --- a/lib/ssh.js +++ b/lib/ssh.js @@ -28,7 +28,6 @@ module.exports = function (opt) { }) .connect(opt); conn.once('end', () => agent.destroy()); - return agent; } catch (err) { handleError(err); @@ -40,4 +39,6 @@ module.exports = function (opt) { agent.destroy(); throw err; } + + return agent; };