Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Targeted dir must be a parent to the reference path. #244

Open
ioleo opened this issue Feb 1, 2016 · 7 comments
Open

Targeted dir must be a parent to the reference path. #244

ioleo opened this issue Feb 1, 2016 · 7 comments

Comments

@ioleo
Copy link
Member

ioleo commented Feb 1, 2016

I'm getting Targeted dir must be a parent to the reference path. error on line:

Filesystem/RelativePathComputer.php#L33

My enviroment:
Windows 10
bower, php, node, ruby installed globally

The problem is I have vendors on RAMDISK (for performance) and /vendor dir is only a symlink to actual directory on RAMDISK.

When I renamed symlink to vendor2 and copy-pasted vendors from ramdisk - the issue was fixed.

Is there any way we could avoid raising this exception in this case?

@sescandell
Copy link
Member

@loostro I think the easiet way to handle all this specific cases is to add an option "target" so we don't automatically compute the target dir, but let the user define the one he wants.

What do you think?

@bobvandevijver
Copy link
Member

I think it is better to use the Symfony Filesystem component for this as the errors lies in the fact that string comparison is used here. When using the Filesystem, we should be able to compute the correct answer, not depending on symlinks.

Thoughts?

@ioleo
Copy link
Member Author

ioleo commented Feb 2, 2016

I'll try replaceing it locally with symfony2 filesystem component and see if it works. Will do a PR if it does.

@sescandell
Copy link
Member

@bobvandevijver I think you are talking about makePathRelative method?

Let's try it...

@bobvandevijver
Copy link
Member

Maybe in combination with the Finder component, to find if the given directory can be found inside the parent directory. Not use about the performance impact though, but I guess this is only needed during cache warmup?

@sescandell
Copy link
Member

@bobvandevijver actually only in a command to install bower packages... performance doesn't matter here.

@sescandell
Copy link
Member

Is anyone working on that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants