Skip to content

Conversation

ryancdotorg
Copy link
Contributor

Fixes #267

@@ -103,7 +103,7 @@ func main() {
}

if fi, err := out.Stat(); err == nil {
if fi.Mode().IsRegular() && fi.Mode().Perm()&0004 != 0 {
if !convertFlag && fi.Mode().IsRegular() && fi.Mode().Perm()&0004 != 0 {
Copy link
Owner

Choose a reason for hiding this comment

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

Let's make this if more compact and move it to the else at the end of the function, before generate(out).

if fi, err := out.Stat(); err == nil && fi.Mode().IsRegular() && fi.Mode().Perm()&0004 != 0 {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, I think.

@FiloSottile FiloSottile merged commit 759a88d into FiloSottile:master May 19, 2021
@ryancdotorg ryancdotorg deleted the patch-1 branch May 19, 2021 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

age-keygen -y generates spurious warning when redirecting stdout to a file
2 participants