Improve error message for new packages

Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
This commit is contained in:
Ilya Dmitrichenko 2017-12-18 16:27:48 +00:00
parent 8eeda0164b
commit 142ebf6f82
No known key found for this signature in database
GPG Key ID: E7889175A6C0CEB9

View File

@ -89,6 +89,10 @@ func (g git) treeHash(pkg, commit string) (string, error) {
return "", err return "", err
} }
if out == "" {
return "", fmt.Errorf("Package %s is not in git", pkg)
}
matches := treeHashRe.FindStringSubmatch(out) matches := treeHashRe.FindStringSubmatch(out)
if len(matches) != 2 { if len(matches) != 2 {
return "", fmt.Errorf("Unable to parse ls-tree output: %q", out) return "", fmt.Errorf("Unable to parse ls-tree output: %q", out)