Skip to content

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

@DartBot

Description

@DartBot

Originally opened as dart-lang/sdk#3493

This issue was originally filed by [email protected]


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

type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions