Skip to content

Allow trailing slash(es) in urls? #477

Open

Description

@BjarkeHautop

Could the regex matching be extended to allow trailing slash(es) in urls? I.e. allow https://github.com/r-lib/pkgdepends/ as a valid url.

The main motivation is that pkgdown github link url appends a trailing slash, and thus when I copy-paste the url to pak I need to remove this trailing slash for it to work.

pak::pak("https://github.com/r-lib/pkgdepends/")
#> Error:
#> ! ! error in pak subprocess
#> Caused by error in `get_remote_types(refs)`:
#> ! Cannot parse package: https://github.com/r-lib/pkgdepends/.
#> ℹ See `?pkgdepends::pkg_refs()` for supported package sources.

Created on 2026-07-22 with reprex v2.1.1.9000

Activity

  1. gaborcsardi commented on Jul 22, 2026

    @gaborcsardi
    Member

    Sure, a PR is welcome. (But no pressure!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions