Skip to content

Commit

Permalink
Add message on successful dry run
Browse files Browse the repository at this point in the history
  • Loading branch information
gergness committed Apr 21, 2021
1 parent 144b41a commit 4529dc3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/automation.R
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,14 @@ runCrunchAutomation <- function(dataset, script, is_file = string_is_file_like(s
}
if (length(script) != 1) script <- paste(script, collapse = "\n")

body <- list(body = script, ...)
crPOST(
shojiURL(dataset, "catalogs", "scripts"),
body = toJSON(wrapEntity(body = list(body = script, ...))),
body = toJSON(wrapEntity(body = body)),
status.handlers = list(`400` = crunchAutomationErrorHandler)
)
# Provide feedback for dry_run success so that user is confident it was succesful
if (isTRUE(body$dry_run)) message("Script dry run was successful")
invisible(refresh(dataset))
}

Expand Down

0 comments on commit 4529dc3

Please sign in to comment.