Skip to content

Commit

Permalink
installation of js package manager fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Stepniak authored and nbbn committed Jan 9, 2024
1 parent 5a1296a commit c4eb18a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion R/node.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,16 @@ js_package_manager <- function(...) {
dependency_name = display_names[[command]],
documentation_url = "https://go.appsilon.com/rhino-system-dependencies"
)
init_js_package_manager()
js_package_manager_raw(...)
}

init_js_package_manager <- function() {
command <- read_config()$js_package_manager
if (!fs::dir_exists(node_path())) {
add_node()
}
if (!fs::dir_exists(node_path("node_modules"))) {
js_package_manager_raw(command, "install", "--no-audit", "--no-fund")
}
js_package_manager_raw(...)
}

0 comments on commit c4eb18a

Please sign in to comment.