Closed plietar closed 6 years ago
/> tree
.
├── pony-bar
│ ├── bar
│ │ └── bar.pony
│ └── bundle.json
└── pony-foo
└── foo
└── foo.pony
/> cd pony-bar
/pony-bar> stable add local-git ../pony-foo
...
/pony-bar> stable fetch
fatal: '../pony-foo' does not appear to be a git repository
The bundle.json
then contains the local-path
of ../pony-foo
The command being run is git -C .deps/-pony-foo12345 pull ../pony-foo
This executes git as if it was in the pony-bar/.deps/-pony-foo12345
directory, where ../pony-foo
is highly likely to not exist.
The command that should be run, if using relative paths, is git -C .deps/-pony-foo12345 pull ../../../pony-foo
The work-around is to use an absolute path in the bundle.json
.
With local repos (local-git
and local
) I see three options;
git
.../
elements to add to the git command which is likely to be two, as dependencies are stored two deep.Not item 1.
I don't really see a difference between 2 and 3. It seems like the same thing, slightly different implementation.
local-git
actually uses the bundle's path:
fun root_path(): String =>
Path.join(bundle.path.path, Path.join(".deps", package_name))
I can make a similar change for local
Because I'm in the
/pony-bar/bar
folder, the../pony-foo
path refers to/pony-bar/pony-foo
, which obviously doesn't exist. This seems unintuitive to me. I would expect all paths to be relative to thebundle.json
file.This probably affects
local-git
dependencies as well.