Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cp: unknown option -- ) #569

Open
olathan opened this issue May 10, 2024 · 0 comments
Open

cp: unknown option -- ) #569

olathan opened this issue May 10, 2024 · 0 comments

Comments

@olathan
Copy link

olathan commented May 10, 2024

I have problems to run covr::package_coverage() (covr version 3.6.4) on R-4.3.2 in a Windows environment.

The following function call on DoseFinding fails (same with other packages):

package_coverage(
  path = "q:/temp/DoseFinding",
  type = "tests",
  combine_types = TRUE,
  relative_path = FALSE,
  quiet = FALSE,
  clean = FALSE,
  line_exclusions = NULL,
  function_exclusions = NULL,
  code = character(),
  install_path = "q:/temp/sub"
)

Running into this problem:

'\\metronomia.de\metro\Home\me\Documents'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
* installing *binary* package 'DoseFinding' ...
cp: unknown option -- )
Try '/p/StatsTools/rtools43/usr/bin/cp --help' for more information.
ERROR: installing binary package failed
* removing 'q:/temp/sub/DoseFinding'
Error in file(con, "r") : cannot open the connection
In addition: Warning messages:
1: In utils::install.packages(repos = NULL, lib = install_path, pkg$path,  :
  installation of packageq:/temp/DoseFindinghad non-zero exit status
2: In file(con, "r") :
  cannot open file 'q:/temp/sub/DoseFinding/R/DoseFinding': No such file or directory

rtools43 is in the path and obviously there is no option "-- )" for cp.
This solution does not work for me, because I don't have Linux: https://github.com/r-lib/covr/issues/520

My thoughts are:
In my environment I need to run "source" package installation with option: INSTALL_opts = "--no-test-load"
Maybe covr also has to run with this option to succeed?

When I install "source" package without option "--no-test-load" I got the following Error and with this option the installation is fine.

...
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) :
  there is no package called 'DoseFinding'
Error: loading failed
Execution halted
ERROR: loading failed
* removing 'q:/temp/DoseFinding'
Warning in install.packages :
  installation of packageq:/temp/DoseFinding_1.1-1.tar.gzhad non-zero exit status

Are there settings to generally prevent from loading tests during installation?
Or other solutions to get test also installed?
Or is my thought wrong and there is another solution for me to run package_coverage()?

Please help to get package_coverage() working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant