mirror of
https://github.com/TECHNOFAB11/jsonnet-bundler.git
synced 2025-12-12 08:00:05 +01:00
fix(deps): catch git parse errors on Unmarshal (#79)
Fixes the nil pointer error that currently happens with invalid URL.
This commit is contained in:
parent
4a1cd85aca
commit
efe0c9e864
1 changed files with 3 additions and 0 deletions
|
|
@ -68,6 +68,9 @@ func (gs *Git) UnmarshalJSON(data []byte) error {
|
|||
}
|
||||
|
||||
tmp := parseGit(j.Remote)
|
||||
if tmp == nil {
|
||||
return fmt.Errorf("unable to parse git url `%s` ", j.Remote)
|
||||
}
|
||||
gs.Host = tmp.Source.GitSource.Host
|
||||
gs.User = tmp.Source.GitSource.User
|
||||
gs.Repo = tmp.Source.GitSource.Repo
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue