Skip to content

Commit 1621bf1

Browse files
committed
refactor: prevent creation of empty inst/WORDLIST
1 parent f4dfacb commit 1621bf1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

inst/hooks/exported/spell-check.R

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ if (file.exists(path_wordlist)) {
1717
ignore <- readLines(path_wordlist, encoding = "UTF-8")
1818
action <- "update"
1919
} else {
20-
if (!dir.exists(dirname(path_wordlist))) {
21-
dir.create(dirname(path_wordlist))
20+
if (isFALSE(arguments$no_update)) {
21+
if (!dir.exists(dirname(path_wordlist))) {
22+
dir.create(dirname(path_wordlist))
23+
}
24+
file.create(path_wordlist)
2225
}
23-
file.create(path_wordlist)
2426
ignore <- character()
2527
action <- "create"
2628
}

0 commit comments

Comments
 (0)