Skip to content

Conversation

@ysono
Copy link

@ysono ysono commented Sep 1, 2016

If the machine doing the compilation does not have a file at $HOME/.ssh/known_hosts, the compilation (repl or jar or uberjar) fails.

Right now I'm getting around the issue with below hack.

(defn touch [path]
  (with-open [writer (io/writer (io/file path)
                                :append true)]
    (spit writer "")))

(when-not (contains? (loaded-libs) 'clj-ssh.cli)
  (touch (str (System/getProperty "user.home") "/.ssh/known_hosts"))
  (load "/clj_ssh/cli")
  (alias 'my-alias 'clj-ssh.cli))

in lieu of (:require [clj-ssh.cli :as my-alias]).

No tests added, but I'm not sure how to add one without making it complicated with alter-root-var and proxy tricks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants