R/get_name.R

Defines functions get_name

#' Attempt to pick up a default name for user
#'
#' Tries to find a name from Git details. Otherwise takes the username from the system information.
#'
#' @noRd
get_name <- function() {
  ifelse(
    !is.null(git2r::config()$global$user.name),
    git2r::config()$global$user.name,
    Sys.info()[["user"]]
  )
}
Health-SocialCare-Scotland/phstemplates documentation built on June 13, 2025, 2:51 p.m.