posit-dev / publisher

MIT License
3 stars 0 forks source link

Only request renv::paths() if no renv.lock present #1931

Closed mmarchetti closed 3 days ago

mmarchetti commented 3 days ago

Intent

This PR avoids invoking R to request renv::paths$lockfile() if there's an renv.lock in the project directory.

Follow-on to #1929

Type of Change

Automated Tests

Added a test for this behavior.

Directions for Reviewers

Inspect an R project that contains renv.lock, and one that doesn't.

If there's an renv.lock file, you shouldn't see a log line like:

level=DEBUG msg="Running command" cmd=/usr/local/bin/R args="-s -e renv::paths$lockfile()"