add check for nil api client
Signed-off-by: Meredith Lancaster <malancas@github.com>
This commit is contained in:
parent
166e211e2b
commit
05d9156a99
1 changed files with 3 additions and 0 deletions
|
|
@ -127,6 +127,9 @@ func runDownload(opts *Options) error {
|
|||
|
||||
opts.Logger.VerbosePrintf("Downloading trusted metadata for artifact %s\n\n", opts.ArtifactPath)
|
||||
|
||||
if opts.APIClient == nil {
|
||||
return fmt.Errorf("no APIClient provided")
|
||||
}
|
||||
params := api.FetchParams{
|
||||
Digest: artifact.DigestWithAlg(),
|
||||
Limit: opts.Limit,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue