Skip to content

[BUG] Tilde causes invalid repository path component error #1375

@OkJaybird

Description

@OkJaybird

Describe the bug
Having a tilde character ~ in an external repo segment causes apm install to fail with the error below. Bitbucket Data Center and Server installations use the ~ character prefix to indicate a personal user repository.

apm install
[>] Installing dependencies from apm.yml...
[x] Failed to parse apm.yml: Invalid APM dependency 'https://example.com/scm/path/~myuser/my-apm-repo.git': Invalid repository path component: ~myuser
[!] Install interrupted after 0.0s

To Reproduce
Steps to reproduce the behavior:

  1. Add an apm dependency to your apm.yml file with a tilde like:
name: my-app
version: 0.1.0
targets:
  - copilot
dependencies:
  apm:
    - https://example.com/scm/path/~myuser/my-apm-repo.git
  1. Run command apm install
  2. See error

Expected behavior
Repository URL is handled properly and apm dependency is installed from repo.

Environment (please complete the following information):

  • OS: macOS
  • Python Version: 3.12.5
  • APM Version: 0.13.0
  • VSCode Version (if relevant): N/A

Logs
See above - logs provided in bug description.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething does not work as documented.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions