From 73d0d743bda5367fcab2453bbe21c15e481150c2 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sun, 8 Jan 2012 23:57:48 +1000 Subject: makepkg: abort on missing download agent makepkg would not abort on a missing download agent due to the output variable being declared local on the same line as the function call in the assignment. That would result in strange output such as: ==> Retrieving Sources... ==> ERROR: There is no agent set up to handle foo URLs. Check /etc/makepkg.conf. Aborting... -> Downloading foobaz... /home/arch/code/pacman/scripts/makepkg: line 401: foo://foobaz: No such file or directory ==> ERROR: Failure while downloading foobaz Aborting... Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/makepkg.sh.in') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index a700d9d0..797b8d78 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -551,7 +551,8 @@ download_sources() { fi # find the client we should use for this URL - local dlclient=$(get_downloadclient "$url") || exit $? + local dlclient + dlclient=$(get_downloadclient "$url") || exit $? msg2 "$(gettext "Downloading %s...")" "$file" # fix flyspray bug #3289 -- cgit v1.2.3-70-g09d2