Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore no git user.email if we're skipping git #281

Merged
merged 2 commits into from
Jul 24, 2024
Merged

Conversation

reavessm
Copy link
Contributor

Advanced git-configs like includeIf break (see #238), this at least allows users to handle git on their own, later

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

Problem/Feature

Please include a description of the problem or feature this PR is addressing.

Description of Changes:

  • Ignore git user.email check if git config == skip

Checklist

Advanced git-configs like includeIf break (see Melkeydev#238), this at least allows users to handle git on their own, later

Signed-off-by: Stephen Reaves <reaves735@gmail.com>
Copy link

@ccoVeille ccoVeille left a comment

Choose a reason for hiding this comment

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

This would be more readable and simple I think

Comment on lines 232 to 238
if p.GitOptions.String() != flags.Skip {
if !emailSet {
fmt.Println("user.email is not set in git config.")
fmt.Println("Please set up git config before trying again.")
panic("\nGIT CONFIG ISSUE: user.email is not set in git config.\n")
}
}

Choose a reason for hiding this comment

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

Suggested change
if p.GitOptions.String() != flags.Skip {
if !emailSet {
fmt.Println("user.email is not set in git config.")
fmt.Println("Please set up git config before trying again.")
panic("\nGIT CONFIG ISSUE: user.email is not set in git config.\n")
}
}
if !emailSet && p.GitOptions.String() != flags.Skip {
fmt.Println("user.email is not set in git config.")
fmt.Println("Please set up git config before trying again.")
panic("\nGIT CONFIG ISSUE: user.email is not set in git config.\n")
}

Signed-off-by: Stephen Reaves <reaves735@gmail.com>
Copy link
Collaborator

@Ujstor Ujstor left a comment

Choose a reason for hiding this comment

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

Good catch, this slipped under the radar. Tnx

@Ujstor Ujstor merged commit 539428d into Melkeydev:main Jul 24, 2024
155 checks passed
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.

3 participants