-
-
Notifications
You must be signed in to change notification settings - Fork 319
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
#684 Relative Symlinks #685
Conversation
Based on Symfony/Filesystem->makePathRelative()
@@ -236,7 +236,36 @@ protected function getMap() | |||
} | |||
|
|||
if ($this->isRelative()) { | |||
$fromDir = $fs->getDir($this->getProject())->getPath(); | |||
$endPath = $fs->getDir($this->getProject())->getAbsolutePath(); | |||
$startPath = $this->getLink(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only works if the link path given is absolute, how to get absolute path from $this->getLink()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can get the absolute path for $this->getLink()
in combination with PhingFile
like:
$startPath = (new PhingFile($this->getLink()))->getAbsolutePath();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@siad007 Thanks for that updated and working with a relative path to the project root is given in the command.
Get the absolute path for the link using PhingFile
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closed in favor of #695 - thanks for your contribution! |
Based on Symfony/Filesystem->makePathRelative()