check_unstaged = function() {
msg_start("Checking for uncommitted files...check_unstaged()")
output = system2("git",
args = c("diff", "--name-only"),
stdout = TRUE)
if (length(output) > 0L) {
msg_warning("You have some unstaged files")
msg_warning(output)
msg_warning("It's worth commiting, then rerunning make final")
} else {
msg_success("Everything committed!")
}
return(invisible(TRUE))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.