File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -188,7 +188,11 @@ git_uncommitted <- function(untracked = FALSE) {
188188 nrow(git_status(untracked )) > 0
189189}
190190
191- challenge_uncommitted_changes <- function (untracked = FALSE , msg = NULL ) {
191+ challenge_uncommitted_changes <- function (
192+ untracked = FALSE ,
193+ msg = NULL ,
194+ error_call = caller_env()
195+ ) {
192196 if (! uses_git()) {
193197 return (invisible ())
194198 }
@@ -207,7 +211,8 @@ challenge_uncommitted_changes <- function(untracked = FALSE, msg = NULL) {
207211 ui_abort(
208212 "
209213 There are uncommitted changes.
210- Please commit or stash before continuing."
214+ Please commit or stash before continuing." ,
215+ call = error_call
211216 )
212217 }
213218
@@ -223,7 +228,7 @@ challenge_uncommitted_changes <- function(untracked = FALSE, msg = NULL) {
223228 )
224229
225230 if (choice == 0 || choice == 1 ) {
226- ui_abort(" Cancelling." )
231+ ui_abort(" Cancelling." , call = error_call )
227232 } else if (choice == 2 ) {
228233 # Loop will re-check git_uncommitted()
229234 } else if (choice == 3 ) {
You can’t perform that action at this time.
0 commit comments