Skip to content

Commit

Permalink
Ensure quiet flag is passed through appropriately
Browse files Browse the repository at this point in the history
  • Loading branch information
ateucher committed Oct 19, 2023
1 parent 18d6c30 commit aa5cb33
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions R/clip_erase.R
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,11 @@ mapshaper_clip_erase <- function(target_layer, overlay_layer, bbox, type,
if (isTRUE(gj2008)) {
command <- paste(command, "gj2008")
}

if (isTRUE(quiet)) {
command <- paste(command, "-quiet")
}

# Create an object to hold the return value
ms$eval("var return_data;")

Expand Down
7 changes: 6 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ apply_mapshaper_commands <- function(
out_flags <- paste("-o", add_id, gj2008)
}

command <- c(command, out_flags)
command <- c(
command,
out_flags,
if (quiet) "-quiet"
)

command <- paste(ms_compact(command), collapse = " ")

ms <- ms_make_ctx()
Expand Down

0 comments on commit aa5cb33

Please sign in to comment.