Skip to content

Function install.URL: should warn if R is installed in a different directory #187

@discoleo

Description

@discoleo

Warn if R is installed in a different directory

A bug can appear if:

  • previous version of R is installed in a different directory than the standard one, and the user forgets to change the directory during the setup of the new R version;
  • the new R version will be installed in the standard location: but the previous packages are in a different location;
  • updateR() will not detect the newly installed R version and will exit (even though the installation was succesful, but in the standard directory now);

Solution

The function install.URL should check if R is installed in a non-standard directory and warn the user to change the direcory during the R setup. The code could be inserted in the block of code at line 223:

# Note: this is the existing installr code:
if(is.windows()) {
	shell_output <- shell(install_cmd, wait = wait,...) # system(exe_filename) # I suspect shell works better than system
} else {
	shell_output <- system(install_cmd, wait = wait,...) # system(exe_filename) # I suspect shell works better than system
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions