Commit 19cd244c authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

2.33.5: treat T as an alias for *standard-output* in slurp-input-stream

And thus in run-program and run-shell-command.
Add a test for capturing output with run-shell-command -- yuck.
parent d08acb9a
......@@ -74,7 +74,7 @@
:licence "MIT"
:description "Another System Definition Facility"
:long-description "ASDF builds Common Lisp software organized into defined systems."
:version "2.33.4" ;; to be automatically updated by make bump-version
:version "2.33.5" ;; to be automatically updated by make bump-version
:depends-on ()
#+asdf3 :encoding #+asdf3 :utf-8
;; For most purposes, asdf itself specially counts as a builtin system.
......
......@@ -131,7 +131,7 @@ output to *VERBOSE-OUT*. Returns the shell's exit code.
PLEASE DO NOT USE.
Deprecated function, for backward-compatibility only.
Please use ASDF-DRIVER:RUN-PROGRAM instead."
Please use UIOP:RUN-PROGRAM instead."
(let ((command (apply 'format nil control-string args)))
(asdf-message "; $ ~A~%" command)
(run-program command :force-shell t :ignore-error-status t :output *verbose-out*))))
......
;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
;;; This is ASDF 2.33.4: Another System Definition Facility.
;;; This is ASDF 2.33.5: Another System Definition Facility.
;;;
;;; Feedback, bug reports, and patches are all welcome:
;;; please mail to <asdf-devel@common-lisp.net>.
......
;; -*- Lisp -*-
(declaim (optimize (debug 3) (safety 3)))
(assert-equal '("ok 1") (run-program "echo ok 1" :output :lines))
......@@ -13,6 +14,18 @@
(error "Failed to capture exit status indicating shell command failure."))
(unless (equal 0 (run-shell-command "./good-shell-command"))
(error "Failed to capture exit status indicating shell command failure."))
(let ((ok1 (format nil "; $ echo ok 1~%ok 1~%")))
(assert-equal
(with-output-to-string (s)
(let ((*verbose-out* s))
(run-shell-command "echo ~A 1" "ok")))
ok1)
(assert-equal
(with-output-to-string (s)
(let ((*verbose-out* t)
(*standard-output* s))
(run-shell-command "echo ok ~D" 1)))
ok1))
;; NB1: run-shell-command is deprecated. Use run-program instead.
;; NB2: we do NOT support stderr capture to *verbose-out* anymore in run-shell-command.
;; If you want 2>&1 redirection, you know where to find it.
......
......@@ -176,6 +176,10 @@ by /bin/sh in POSIX"
(declare (ignorable x))
(slurp-stream-form stream :at at))
(defmethod slurp-input-stream ((x (eql t)) stream &rest keys &key &allow-other-keys)
(declare (ignorable x))
(apply 'slurp-input-stream *standard-output* stream keys))
(defmethod slurp-input-stream (x stream
&key linewise prefix (element-type 'character) buffer-size
&allow-other-keys)
......
......@@ -52,7 +52,7 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO
;; "3.4.5.67" would be a development version in the official upstream of 3.4.5.
;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5
;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67
(asdf-version "2.33.4")
(asdf-version "2.33.5")
(existing-version (asdf-version)))
(setf *asdf-version* asdf-version)
(when (and existing-version (not (equal asdf-version existing-version)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment