Skip to content

fn to avoid remotes::install_git() error on network drives#315

Merged
slager merged 7 commits intodevelopfrom
install_git_workaround
Dec 2, 2025
Merged

fn to avoid remotes::install_git() error on network drives#315
slager merged 7 commits intodevelopfrom
install_git_workaround

Conversation

@slager
Copy link
Contributor

@slager slager commented Nov 20, 2025

Description

Drop-in replacement for remotes::install_git(), to avoid recurring issue of that function giving this error when used on network drives:

> remotes::install_git('/networks/path/repo.git')
Error: Failed to install 'unknown package' from Git:
  Error in 'git2r_remote_ls': unsupported URL protocol

Related Issues

Provide links to any related GitHub issues.

Checklist

  • This PR includes unit tests
  • This PR establishes a new function or updates parameters in an existing function
    • The roxygen skeleton for this function has been updated using devtools::document
  • I have updated NEWS.md to describe the proposed changes

@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.41%. Comparing base (49fac3a) to head (96faef8).
⚠️ Report is 8 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #315      +/-   ##
===========================================
+ Coverage    85.33%   85.41%   +0.07%     
===========================================
  Files            9       10       +1     
  Lines          375      377       +2     
===========================================
+ Hits           320      322       +2     
  Misses          55       55              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@slager slager marked this pull request as ready for review November 21, 2025 20:17
@kelliemac
Copy link
Contributor

tested and works on my mac. thanks dave!

Copy link
Contributor

@mayerbry mayerbry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

per our discussion: create two arguments. first argument is required to be a path input and named accordingly. keep ... for second argument and reference remotes::install_git help. Corresponds to any input except url which will be hard assigned via the processed version of the path input.
Functionality of function should be the same effectively, but should make the help documentation cleaner as it relates to first argument being the filepath.

very crude pseudo code

function (new_path_arg, ...) 
{
 [directory management, tests]
 remotes::install_git(url = basename(new_path_arg), ...)
 [directory management]
}

@slager slager merged commit b8641f6 into develop Dec 2, 2025
12 of 13 checks passed
@slager slager deleted the install_git_workaround branch December 2, 2025 20:29
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

Successfully merging this pull request may close these issues.

3 participants