Skip to content

Commit 18e0afb

Browse files
committed
Add ssh/exit-status for querying exit code
1 parent 5980157 commit 18e0afb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/clj_ssh/ssh.clj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,11 @@ keys. All other option key pairs will be passed as SSH config options."
388388
[^Session session]
389389
(open-channel session :shell))
390390

391+
(defn exit-status
392+
"Return the exit status of a channel."
393+
[^Channel channel]
394+
(.getExitStatus channel))
395+
391396
(def
392397
^{:dynamic true
393398
:doc (str "The buffer size (in bytes) for the piped stream used to implement

0 commit comments

Comments
 (0)