Skip to content

Commit c8a0a8e

Browse files
committed
Merge branch 'release/0.5.3'
2 parents 690991c + 28789cc commit c8a0a8e

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ A: Probably a disk full, or permission error.
133133
Via [clojars](http://clojars.org) and
134134
[Leiningen](http://github.com/technomancy/leiningen).
135135

136-
:dependencies [clj-ssh "0.5.2"]
136+
:dependencies [clj-ssh "0.5.3"]
137137

138138
or your favourite maven repository aware tool.
139139

ReleaseNotes.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Release Notes
22

3-
Current release is 0.5.2
3+
Current release is 0.5.3
4+
5+
## 0.5.3
6+
7+
- Add ssh/exit-status for querying exit code
8+
9+
- Add type hints to session functions
410

511
## 0.5.2
612

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(defproject clj-ssh "0.5.2"
1+
(defproject clj-ssh "0.5.3"
22
:description "Library for using SSH from clojure."
33
:url "https://github.com/hugoduncan/clj-ssh"
44
:license {:name "Eclipse Public License"

src/clj_ssh/ssh.clj

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@
233233
(add-identity agent options)))))
234234

235235
;;; Sessions
236-
(defn- session-impl
236+
(defn- ^Session session-impl
237237
[^JSch agent hostname username port ^String password options]
238238
(let [session (.getSession agent username hostname port)]
239239
(when password
@@ -247,7 +247,7 @@
247247
(as-string v)))
248248
session))
249249

250-
(defn session
250+
(defn ^Session session
251251
"Start a SSH session.
252252
Requires hostname. you can also pass values for :username, :password and :port
253253
keys. All other option key pairs will be passed as SSH config options."
@@ -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)