File tree Expand file tree Collapse file tree 1 file changed +23
-5
lines changed
Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Original file line number Diff line number Diff line change 1414# ' docker_ignore_add()
1515# ' }
1616docker_ignore_add <- function (path ) {
17- path <- fs :: path(
17+ path_di <- fs :: path(
1818 path ,
1919 " .dockerignore"
2020 )
2121
2222 if (! fs :: file_exists(
23- path
23+ path_di
2424 )) {
25- fs :: file_create(path )
25+ fs :: file_create(path_di )
2626
2727 write_ignore <- function (content ) {
28- write(content , path , append = TRUE )
28+ write(content , path_di , append = TRUE )
2929 }
3030
3131 for (i in c(
@@ -39,6 +39,24 @@ docker_ignore_add <- function(path) {
3939 )) {
4040 write_ignore(i )
4141 }
42+
43+ path_ri <- fs :: path(
44+ path ,
45+ " .Rbuildignore"
46+ )
47+ if (fs :: file_exists(
48+ path_ri
49+ )) {
50+ write(
51+ " ^\\ .dockerignore$" ,
52+ path_ri ,
53+ append = TRUE )
54+ cat_bullet(
55+ " .dockerignore added to the .Rbuildignore file." ,
56+ bullet = " info" ,
57+ bullet_col = " green"
58+ )
59+ }
4260 } else {
4361 cat_bullet(
4462 " .dockerignore already present, skipping its creation." ,
@@ -47,5 +65,5 @@ docker_ignore_add <- function(path) {
4765 )
4866 }
4967
50- return (invisible (path ))
68+ return (invisible (path_di ))
5169}
You can’t perform that action at this time.
0 commit comments