Skip to content

Get dependencies fails on Windows if dependency is a git ref #32

Closed
@timsneath

Description

@timsneath

When running on a Windows runner machine, pub get is unable to successfully retrieve a package that is referenced with git, rather than from the pub server.

As an example, consider the following pubspec.yaml:

name: win32
description: A Dart library for accessing common Win32 APIs using FFI. No C required!
version: 2.1.0
homepage: https://win32.pub
repository: https://github.com/timsneath/win32
issue_tracker: https://github.com/timsneath/win32/issues

environment:
  sdk: '>=2.13.0-165.0 <3.0.0'

dependencies:
  ffi: ^1.0.0

dev_dependencies:
  args: ^2.0.0
  path: ^1.8.0
  pedantic: ^1.11.0
  test: ^1.16.8
  winmd: 
    git: https://github.com/timsneath/winmd.git

# While under development and the winmd dependency points to a git repo
publish_to: none

The embedded pub get attempts to run:

git clone /c/Users/runneradmin/.pub-cache\git\cache\winmd-b4cb580d86c61a1b17c9c09a9241f8586d1d7047 /c/Users/runneradmin/.pub-cache\git\winmd-ad918d98cd47329c82502cf4b893b8cbca9b717c

and of course, this is not a valid command to pass into git clone.

See the following log for an example of this failing:
https://gist.githubusercontent.com/timsneath/960c9ef41e25ae08a0156524f56cf9f7/raw/3b194da1f24f2e85cbfafca946447c6fe42b5fb7/log.txt

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