diff mbox

[Cbuildv2/get_source,08/17] lib/common.sh: Fix for unknown/unmatched get_source request.

Message ID 1382129579-5777-9-git-send-email-ryan.arnold@linaro.org
State New
Headers show

Commit Message

Ryan S. Arnold Oct. 18, 2013, 8:52 p.m. UTC
From: "Ryan S. Arnold" <ryan.arnold@linaro.org>

We aren't guaranteed a match after checking snapshots and source.conf. So
put in an error leg at the end of the function.
---
 lib/common.sh | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox

Patch

diff --git a/lib/common.sh b/lib/common.sh
index 80f5fe9..64d0a30 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -445,6 +445,12 @@  get_source()
 	fi
     fi
 
+    # We aren't guaranteed a match even after snapshots and sources.conf have
+    # been checked.
+    if test x"${url}" = x; then
+	return 1
+    fi
+
     echo "${url}${branch:+ ${branch}}${revision:+ ${revision}}"
 
     return 0