Open NavyCoat opened 5 years ago
This seems to be a problem specific to vagrant/virtualbox on a windows host with a linux guest and shared folders.
I found a similar issue that existed for npm (https://github.com/npm/npm/issues/12733). Some further google foo directed me to an article at http://perrymitchell.net/article/npm-symlinks-through-vagrant-windows/, which seems to address that issue. Admittingly the post is quite old - it's from 2015 - and may no longer be relevant or the way to go.
@ThomasWeinert Any chance you can have a look into that?
We certainly need to not crash here, so have to handle a failing symlink call properly.
I'm not sure though as to what the correct fix for the actual problem would be?
Virtualbox does not allow symlinks on shared folders for security reasons. They need to be enabled seperatly. See https://stackoverflow.com/a/24365338/6523409
Phive should detect if symlinks are not supported and then copy file instead of make symlink. MAybe it could detect this by making test symlink and check if there is no error.
Phive should detect if symlinks are not supported and then copy file instead of make symlink.
That doesn't work: To the best of my knowledge, there is no API, neither in PHP nor on a lower level, to learn whether or not symlinks are supported on the given target directory. And that makes sense as given the tree structure of a unix system, you'd have to read the fstab along with realpath resovling to figure out on what FS the given target ends up on. Once you know the FS type you might have to either just know or find out by other means if symlinks are supported by it. Given that the behavior might even change based on configuration of the FS, that's rather unreliable.
The only workaround for that might be to try to just attempt to create a symlink and see if that fails. It could fail for various reasons though...
Additionally, silently creating a copy instead is unexpected behavior. We could of course add some output to make it not "silent" but who reads output? ;)
So far, I'm considering to simply fail the install.
There was nice message to report bug, so...
it's occured on newly installed (5 min ago) phive, when i'm trying to run
phive install phpab