diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 205d5b3672108f72d03f47c6c1a7f04a66ef4b46..d0714ab8cab174b03f387f8581ac6cfae23d2d57 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,4 +3,4 @@ job_R:
     - echo $HOME
     - Rscript -e 'getwd(); .libPaths(); sessionInfo()'
     - Rscript -e 'library(devtools); check()'
-    - Rscript -e 'library(devtools); install(local = FALSE, lib = path.expand("~/R-tests/legTools"))'
+    - Rscript -e 'library(devtools); .libPaths(new = path.expand("~/R-tests/legTools")); install(local = FALSE)'