Skip to content

Conversation

@dhiltgen
Copy link
Contributor

@dhiltgen dhiltgen commented Oct 3, 2018

Forward port #1408 to master

Daniel Hiltgen added 2 commits October 3, 2018 13:48
Prior refactoring passes missed a corner case.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
(cherry picked from commit dee3793)
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
(cherry picked from commit 9293264)
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
@codecov-io
Copy link

Codecov Report

Merging #1415 into master will increase coverage by 0.08%.
The diff coverage is 90.9%.

@@            Coverage Diff             @@
##           master    #1415      +/-   ##
==========================================
+ Coverage   54.26%   54.35%   +0.08%     
==========================================
  Files         289      289              
  Lines       19331    19334       +3     
==========================================
+ Hits        10490    10509      +19     
+ Misses       8165     8146      -19     
- Partials      676      679       +3

if license, err = getLicenses(ctx, authConfig, cli, options); err != nil {
return err
}
if options.displayOnly {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the fix is here, but isn't it safer and simpler to just check if license is nil?

if license, err = getLicenses(ctx, authConfig, cli, options); err != nil || license == nil {
    return err
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@silvin-lubecki discussing with @dhiltgen out of band; let's merge this one as-is, and do a follow up with improvements

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with it, let's merge the PR then.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah merged commit 29625f6 into docker:master Nov 14, 2018
@GordonTheTurtle GordonTheTurtle added this to the 19.03.0 milestone Nov 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants