Skip to content

Pub: dependency on https://host/dir/ installs into the wrong directory #3493

Closed
@DartBot

Description

@DartBot

This issue was originally filed by sammcca...@google.com


Paths ending in slash don't install properly - the git repo is checked out into packages/ instead of packages/foo/.
In particular, code.google.com recommends repo URLs ending in /.

I think it's detecting the repo name as the empty string, and so running 'git clone $repo packages/$reponame' does the wrong thing.

(Also, shouldn't it be naming the checkout dir after the dependency name in my pubspec? Those are guaranteed to be unique...)

e.g.

$ cat pubspec.yaml
dependencies:
  googleapis:
    git: https://code.google.com/p/foo/

$ pub install
Cloning into '/usr/local/google/home/sammccall/gits/dartapiarysamples/packages'...
Dependencies installed!

$ ls -a packages
. .. .git

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions