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

YCMEPHelper: Remove check for git global name and email being set even if NON_INTERACTIVE_BUILD is OFF #472

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions modules/YCMEPHelper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -327,17 +327,17 @@ function(_YCM_SETUP_GIT)
RESULT_VARIABLE _error_code
OUTPUT_VARIABLE _output_name
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT NON_INTERACTIVE_BUILD AND _error_code)
message(FATAL_ERROR "Failed to get git name. Please set it with \"git config --global user.name Firstname Lastname\" or from your favorite git gui.")
if(_error_code)
set(_output_name "")
endif()

execute_process(COMMAND ${GIT_EXECUTABLE} config --get user.email
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
RESULT_VARIABLE _error_code
OUTPUT_VARIABLE _output_email
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT NON_INTERACTIVE_BUILD AND _error_code)
message(FATAL_ERROR "Failed to get git email. Please set it with \"git config --global user.email [email protected]\" or from your favorite git gui.")
if(_error_code)
set(_output_email "")
endif()

set(YCM_GIT_COMMIT_NAME "${_output_name}" CACHE STRING "Name to use for git commits")
Expand Down
Loading