locate_exec: Find an executable

Description Usage Arguments Value Examples

View source: R/locate_exec.R

Description

Searches for an executable in a some places and use the highest version found (unless a specific version is requested).

Usage

1
locate_exec(exec, cache = TRUE, dir = NULL, version = NULL)

Arguments

exec

executable identifier, a single character. Use one of these values:

  • chrome: "Google Chrome" executable

  • libreoffice: "LibreOffice" executable

  • node: "node.js" executable

  • npm: "npm" executable

  • python: "python" executable

  • pip: "pip" executable

cache

if FALSE, search for the executable again even if the executable has been found previously.

dir

A character vector of directory paths under which the executable may be found.

version

The version of the executable to look for (e.g., "14.15.4"). If NULL (the default), it searches for the highest version.

Value

A list containing the directory and version of the executable if found. If not found, the version will be 0 and the dir will be NULL.

Examples

1
2
3
4
5
6
7
locate_exec("chrome")
locate_exec("chrome", version = "88.0.4324.150")
locate_exec("libreoffice")
locate_exec("node")
locate_exec("npm")
locate_exec("python")
locate_exec("pip")

davidgohel/locatexec documentation built on Feb. 17, 2021, 9:46 a.m.