Skip to content

Commit 8b97cc3

Browse files
feat Add append parameter to write() to allow appending to file instead of overwriting
1 parent 8a3df24 commit 8b97cc3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

R/dockerfile.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,10 @@ cat(self$Dockerfile, sep = "\n")
162162
#' @description
163163
#' Write the Dockerfile to a file.
164164
#' @param as The file to write to.
165+
#' @param append boolean, if TRUE append to file.
165166
#' @return used for side effect
166-
write = function(as = "Dockerfile") {
167-
base::write(self$Dockerfile, file = as)
167+
write = function(as = "Dockerfile", append = FALSE) {
168+
base::write(self$Dockerfile, file = as, append = append)
168169
},
169170
#' @description
170171
#' Switch commands.

0 commit comments

Comments
 (0)