Skip to content

Commit

Permalink
fix: sleep the code for a bit since it can cause problems sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
lwjohnst86 committed Apr 1, 2024
1 parent 6dec25c commit 15771b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions R/pre-course-script.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ unzip(here("data-raw/mmash-data.zip"),
exdir = here("data-raw"),
junkpaths = TRUE
)
Sys.sleep(1)
unzip(here("data-raw/MMASH.zip"),
exdir = here("data-raw")
)
Expand Down
4 changes: 3 additions & 1 deletion preamble/pre-course.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,11 @@ either `Ctrl-Shift-A` or `Code -> Reformat Code` menu item. Next, we'll
extract the new `data-raw/MMASH.zip` file using `unzip()` again. Because
we want to keep the folder structure inside this zip file, we won't use
`junkpaths`. Write and execute this code in the `data-raw/mmash.R`
script.
script. We'll also add a `Sys.sleep(1)` to pause the script for a second
because sometimes the unzipping can be too fast and cause problems.

```{r unzip-data-file}
Sys.sleep(1)
unzip(here("data-raw/MMASH.zip"),
exdir = here("data-raw")
)
Expand Down

0 comments on commit 15771b8

Please sign in to comment.