   {:pre [(keyword? os) (is-ambly-bonjour-name? bonjour-name)
          (string? endpoint-address) (number? endpoint-port)]}
   (let [webdav-endpoint (create-http-url endpoint-address endpoint-port)
-        shell-result (shell/sh "net" "use" "*" webdav-endpoint)]
+        shell-result (sh 30000 "" true "net" "use" "*" webdav-endpoint)]
    (or
-     (extract-drive-letter (subs (:out shell-result) 0 28))
-     (throw (IOException. (:err shell-result))))))
+     (extract-drive-letter (subs shell-result 0 (min 28 (count shell-result))))
+     (throw (IOException. shell-result)))))
 
 (defmethod mount-webdav :unknown
   [os bonjour-name endpoint-address endpoint-port]

    (loop [tries 1]
      (if-not (or (mount-exists? webdav-mount-point) (.mkdirs output-dir))
        (throw (IOException. (str "Unable to create WebDAV mount point " webdav-mount-point))))
      (if (zero? (sh 1000 -1 "mount_webdav" webdav-endpoint webdav-mount-point))
        webdav-mount-point
        (if (= 4 tries)
          (throw (IOException. (str "Unable to mount WebDAV at " webdav-endpoint)))

            [cljs.compiler :as comp]
            [cljs.repl :as repl]
            [cljs.closure :as closure]
            [clojure.data.json :as json])
  (:import java.net.Socket
           java.lang.StringBuilder
           [java.io File BufferedReader BufferedWriter IOException]
