 If you set this to something other than nil, you may be eaten by
 a grue.")
 
+(defun straight--call (command &rest args)
+  "Call COMMAND with ARGS, returning success and output.
+Specifically, return a cons cell whose car is a boolean
+indicating whether the command was successful, and whose cdr
+is the stdout and stderr of the command."
+  (with-temp-buffer
+    (let ((default-directory (or straight--default-directory
+                                 default-directory)))
+      (let ((success (= 0 (apply #'call-process command
+                                 nil '(t t) nil args))))
+        (cons success (buffer-string))))))
+
 (defun straight--check-call (command &rest args)
   "Call COMMAND with ARGS, returning non-nil if it succeeds.
 If the COMMAND exits with a non-zero return code, return nil. If


;;;;; Strings

(defun straight--split-and-trim (string &optional indent)
  "Split the STRING on newlines, returning a list.
Remove any blank lines at the beginning or end. If INDENT is
non-nil, then add that many spaces to the beginning of each line
and concatenate them with newlines, returning a string instead of
a list."
  (let ((parts (split-string string "\n")))
    ;; Remove blank lines from beginning.
    (while (equal (car parts) "")

    (while (equal (car parts) "")
      (setq parts (cdr parts)))
    (setq parts (nreverse parts))
    ;; Remove tail.
    (when (and max-lines (< max-lines (length parts)))
      (setf (nthcdr max-lines parts) nil))
    ;; Add indentation.
    (if indent
        (let ((indent (make-string (or indent 0) ? )))
