Merge pull request #2818 from errordeveloper/master

Improve error message for new packages
This commit is contained in:
Ian Campbell
2017-12-19 11:04:08 +00:00
committed by GitHub

View File

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