Skip to content

Commit

Permalink
fix download_data until rap_copy_from is ready
Browse files Browse the repository at this point in the history
granted that that username will be added to data_file_name
  • Loading branch information
nielsbock authored and lwjohnst86 committed Jun 3, 2024
1 parent 39979a1 commit 31eb137
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/import-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ download_data <- function(project_id = get_rap_project_id(),
with = "rap_copy_from()"
)
file_ext <- rlang::arg_match(file_ext)
rap_path <- rap_get_path_user_files(rap_get_user()) |>
rap_file <- rap_get_path_user_files(rap_get_user()) |>
stringr::str_subset(file_ext) |>
stringr::str_sort(decreasing = TRUE) |>
head(1)
rap_path <- glue::glue("/users/{username}/{rap_file}")

cli::cli_alert_info("Downloading from RAP: {.val {rap_path}}.")
output_path <- glue::glue("data/data.{file_ext}")
Expand Down

0 comments on commit 31eb137

Please sign in to comment.