mirror of
https://github.com/packwiz/packwiz.git
synced 2025-04-19 21:16:30 +02:00
github: check + fail if there are no assets matching regex
Signed-off-by: unilock <unilock@fennet.rentals>
This commit is contained in:
parent
d54da349d5
commit
979b606b1e
@ -134,6 +134,10 @@ func installRelease(repo Repo, release Release, regex string, pack core.Pack) er
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(files) == 0 {
|
||||||
|
return errors.New("release doesn't have any assets matching regex")
|
||||||
|
}
|
||||||
|
|
||||||
if len(files) > 1 {
|
if len(files) > 1 {
|
||||||
// TODO: also print file names
|
// TODO: also print file names
|
||||||
return errors.New("release has more than one asset matching regex")
|
return errors.New("release has more than one asset matching regex")
|
||||||
|
@ -68,6 +68,11 @@ func (u ghUpdater) CheckUpdate(mods []*core.Mod, pack core.Pack) ([]core.UpdateC
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(newFiles) == 0 {
|
||||||
|
results[i] = core.UpdateCheck{Error: errors.New("release doesn't have any assets matching regex")}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if len(newFiles) > 1 {
|
if len(newFiles) > 1 {
|
||||||
// TODO: also print file names
|
// TODO: also print file names
|
||||||
results[i] = core.UpdateCheck{Error: errors.New("release has more than one asset matching regex")}
|
results[i] = core.UpdateCheck{Error: errors.New("release has more than one asset matching regex")}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user