Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Conversation

@vdemeester
Copy link
Contributor

There is a few case where home could not be found (and would not be
needed). Especially as this piece of code is only there to set a
default value for a flag.

cc @cyli @n4ss @endophage

Signed-off-by: Vincent Demeester [email protected]

@n4ss
Copy link
Contributor

n4ss commented Mar 21, 2018

LGTM! (when tests are green >:) )

// Get home directory for current user
homeDir, err := homedir.Dir()
if err != nil {
return nil, fmt.Errorf("cannot get current user home directory: %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we should specify that the default notary directory instead will be $(pwd)/.notary maybe, as part of the warning, since we are still setting a default, it just may be in an unexpected place.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I see what you mean, can definitely change that 😉

Copy link
Contributor

@cyli cyli left a comment

Choose a reason for hiding this comment

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

Other than a nitpick about being more clear in the warning that we may be writing data someplace the user doesn't expect, LGTM.

There is a few case where home could not be found (and would not be
needed). Especially as this piece of code is only there to set a
default value for a flag.

Signed-off-by: Vincent Demeester <[email protected]>
@HuKeping
Copy link
Contributor

LGTM

@HuKeping HuKeping merged commit c3fe777 into notaryproject:master Mar 22, 2018
@vdemeester vdemeester deleted the dont-fail-me-home branch March 22, 2018 13:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants