-
Notifications
You must be signed in to change notification settings - Fork 24
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
Handle symlinks properly #84
Handle symlinks properly #84
Conversation
Hey. I made a release today which was related to another issue and I haven't properly looked at this yet. I would think that when Does that contradict where you say
|
Hey sorry for the confusion. The thing is, if I have that setting on, the original folder (from which it is symlinked) gets cleared out. And that shouldn't happen. The symlink can be deleted. But the original files should stay intact. Does that make sense? My plugin is located in This fix makes sure it can find the location properly, when using relative paths. The test provides the use case that didn't work for me properly. Ps, this worked for me from the PR version; but I couldn't figure out how to package that to a phar, and try that file as well. Could you help with that so I can make 100% sure this solves my problem? |
Create the phar (from GitHub Actions workflow): composer install --no-dev --prefer-dist;
wget -O phar-composer.phar https://github.com/clue/phar-composer/releases/download/v1.4.0/phar-composer-1.4.0.phar;
mkdir build;
mv vendor build/vendor;
mv src build/src;
mv bin build/bin;
mv composer.json build;
php -d phar.readonly=off phar-composer.phar build ./build/; Clean up: mv ./build/*.* .
mv ./build/* .
rm -rf build
composer install Run it: chmod +x strauss.phar
php strauss.phar TBH, I don't know what Those instructions don't include I should document this somewhere better. |
@BrianHenryIE Cool, I was finally able to test this solution and it works! It no longer clears out the folders! When using the normal version I get a Edit: Funny enough I did find a small bug when a package configures an
|
Currently the logic to resolve symlinks is flawed making Strauss ignore symlinked packages. This PR solves that problem, and adds a test to ensure the original symlink is intact after running Strauss with
"delete_vendor_packages": true
.Thanks for providing this tool. If this PR needs changing let me know.
I think this PR can finish #64.
Ref: #64 (comment)