Error regarding if git is not configured.#355
Open
patil-tanv wants to merge 5 commits into
Open
Conversation
patil-tanv
requested review from
AyeshaSanadi,
RajPatil152,
annmary-roy,
shreyas-kulkarni09 and
varkha-d-sharma
June 23, 2026 07:03
AyeshaSanadi
requested changes
Jun 23, 2026
| user_name = user_name.strip() | ||
| user_name_return_code = process.returncode | ||
|
|
||
| logger.info(f"[check_git_config] Git user.name check - Return code: {user_name_return_code}, Value: '{user_name}', Stderr: '{stderr_name.strip()}'") |
Collaborator
There was a problem hiding this comment.
Send this to logger.debug
| user_email = user_email.strip() | ||
| user_email_return_code = process.returncode | ||
|
|
||
| logger.info(f"[check_git_config] Git user.email check - Return code: {user_email_return_code}, Value: '{user_email}', Stderr: '{stderr_email.strip()}'") |
Collaborator
There was a problem hiding this comment.
send this to logger.debug.
| missing_configs.append("user.name") | ||
| if not user_email: | ||
| missing_configs.append("user.email") | ||
| logger.warning(f"[check_git_config] Git configuration INCOMPLETE. Missing: {', '.join(missing_configs)}") |
Collaborator
There was a problem hiding this comment.
Send this to logger.debug and it does not matter even if either one -user or email is missing, it is always an error.
| logger.error(f"[check_git_config] Exception occurred: {err}, Type: {type(err)}") | ||
| git_config_valid = False | ||
|
|
||
| logger.info(f"[check_git_config] Final result: {git_config_valid}") |
Collaborator
There was a problem hiding this comment.
We should not be giving this to user. User would already if they have configured user.name and user.email
RajPatil152
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues / Pull Requests
This PR added error message while doing cmf init if git configuration is not done on system.
Description
While running cmf init command the git config is must else user will not able to proceed.
What changes are proposed in this pull request?
Added error message if git username or user email is not configured on system while running cmf init command. If git config is done properly then cmf init will be successful.
Checklist:
uses Google-style formatting and any other formatting that is supported by mkdocs and plugins this project
uses.
Adding screenshot for reference
