Skip to content

Commit d8fbf32

Browse files
committed
Add message on successful dry run
1 parent 5d77867 commit d8fbf32

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

R/automation.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,14 @@ runCrunchAutomation <- function(dataset, script, is_file = string_is_file_like(s
144144
}
145145
if (length(script) != 1) script <- paste(script, collapse = "\n")
146146

147+
body <- list(body = script, ...)
147148
crPOST(
148149
shojiURL(dataset, "catalogs", "scripts"),
149-
body = toJSON(wrapEntity(body = list(body = script, ...))),
150+
body = toJSON(wrapEntity(body = body)),
150151
status.handlers = list(`400` = crunchAutomationErrorHandler)
151152
)
153+
# Provide feedback for dry_run success so that user is confident it was succesful
154+
if (isTRUE(body$dry_run)) message("Script dry run was successful")
152155
invisible(refresh(dataset))
153156
}
154157

0 commit comments

Comments
 (0)