 
 " intero-package-version))
       (redisplay)
-      (cl-case (call-process "stack" nil (current-buffer) t "build"
-                             (with-current-buffer buffer
-                               (let* ((cabal-file (intero-cabal-find-file))
-                                      (package-name (intero-package-name cabal-file)))
-                                 ;; For local development. Most users'll
-                                 ;; never hit this behaviour.
-                                 (if (string= package-name "intero")
-                                     "intero"
-                                   (concat "intero-" intero-package-version))))
-                             "ghc-paths" "syb")
+      (cl-case (intero-call-process
+		"stack" nil (current-buffer) t "build"
+		(with-current-buffer buffer
+		  (let* ((cabal-file (intero-cabal-find-file))
+			 (package-name (intero-package-name cabal-file)))
+		    ;; For local development. Most users'll
+		    ;; never hit this behaviour.
+		    (if (string= package-name "intero")
+			"intero"
+		      (concat "intero-" intero-package-version))))
+		"ghc-paths" "syb")
         (0
          (message "Installed successfully! Starting Intero in a moment ...")
          (bury-buffer buffer)

    (setq intero-project-root
          (with-temp-buffer
            (cl-case (save-excursion
                       (call-process "stack" nil
                                     (current-buffer)
                                     nil
                                     "path"
                                     "--project-root"
                                     "--verbosity" "silent"))
              (0 (buffer-substring (line-beginning-position) (line-end-position)))
              (t (intero--warn "Couldn't get the Stack project root.


            (get-buffer name)
          (with-current-buffer
              (get-buffer-create name)
	    ;; The new buffer doesn't know if the initial buffer was hosted
	    ;; remotely or not, so we need to extend by the host of the
	    ;; initial buffer to cd. We could also achieve this by setting the
	    ;; buffer's intero-buffer-host, but intero-repl-mode wipes this, so
	    ;; we defer setting that until after.
            (cd (intero-extend-path-by-buffer-host root initial-buffer))
            (intero-repl-mode) ; wipes buffer-local variables
	    (setq intero-buffer-host (intero-buffer-host initial-buffer))
            (intero-repl-mode-start backend-buffer
                                    (buffer-local-value 'intero-targets backend-buffer)
                                    prompt-options)
