Skip to content

Commit e29f250

Browse files
committed
make sure ~/.R/snippet exists
1 parent 6f21ef9 commit e29f250

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

R/add_module.R

+2
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ create_if_needed <- function(
179179
} else {
180180
# Create the file
181181
if (type == "file"){
182+
if(dir_not_exist(dirname(path)))
183+
dir_create(dirname(path), recurse = TRUE)
182184
file_create(path)
183185
write(content, path, append = TRUE)
184186
} else if (type == "directory"){

0 commit comments

Comments
 (0)