diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2020-06-02 23:50:24 +0200 |
---|---|---|
committer | Andrew Gregory <andrew@archlinux.org> | 2020-06-18 11:06:46 +0200 |
commit | f4da297de252dcb00e6c83df00fea11c86606348 (patch) | |
tree | d822637c24449083791345eb57604c3ed433636c /scripts/libmakepkg/source/svn.sh.in | |
parent | 22e6daa79455b1c59ab73af9438ca0c1d2a884b9 (diff) | |
download | pacman-f4da297de252dcb00e6c83df00fea11c86606348.tar.gz pacman-f4da297de252dcb00e6c83df00fea11c86606348.tar.xz |
libmakepkg: fix regression in sending plain() output to stderr
In commit 882e707e40bbade0111cf3bdedbdac4d4b70453b we changed message
output to go to stdout by default, unless it was an error. The plain()
function doesn't *look* like an error function, but in practice it was
-- it's used to continue multiline messages, and all in-tree uses were
for warning/error.
This is a problem both because we're sending output to the wrong place,
and because in some cases, we were performing error logging from a
function which would otherwise return a value to be captured in a
variable using command substution.
Fix this and straighten out the API by providing two functions: one for
continuing msg output, and one which wraps this by sending output to
stderr, for continuing error output.
Change all callers to use the second function.
(cherry picked from commit bf458cced7c0845f7b6fabb887d3878ae4cd51b2)
Diffstat (limited to 'scripts/libmakepkg/source/svn.sh.in')
-rw-r--r-- | scripts/libmakepkg/source/svn.sh.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/libmakepkg/source/svn.sh.in b/scripts/libmakepkg/source/svn.sh.in index e808b2cb..89205ec3 100644 --- a/scripts/libmakepkg/source/svn.sh.in +++ b/scripts/libmakepkg/source/svn.sh.in @@ -60,7 +60,7 @@ download_svn() { ;; *) error "$(gettext "Unrecognized reference: %s")" "${fragment}" - plain "$(gettext "Aborting...")" + plainerr "$(gettext "Aborting...")" exit 1 esac fi @@ -70,7 +70,7 @@ download_svn() { mkdir -p "$dir/.makepkg" if ! svn checkout -r ${ref} --config-dir "$dir/.makepkg" "$url" "$dir"; then error "$(gettext "Failure while downloading %s %s repo")" "${repo}" "svn" - plain "$(gettext "Aborting...")" + plainerr "$(gettext "Aborting...")" exit 1 fi elif (( ! HOLDVER )); then |