-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
symlinks not synced #385
Comments
Yes that could be supported. Do you want to copy the symlink itself, or do you want to treat it like a file/directory (that should be traversed)? |
Copy the synlinks itself, since I have things like:
|
Can you check if this works for you? I've pushed the new feature! |
No, looks like it got broken now. $ ~/go/bin/minify --version
minify v2.9.13-14-gf6339e8
$ uname -a
Linux allan-inspiron5675 5.11.2-1-MANJARO #1 SMP PREEMPT Fri Feb 26 12:17:53 UTC 2021 x86_64 GNU/Linux Without -p: $ ~/go/bin/minify --match '\.(css|html|js|json)$' -sar ./dev -o ./prod
ERROR: stat lib/libweb/ext-3.4.0/ext-core: no such file or directory
$ ls -l dev/lib/libweb/ext-3.4.0/ext-core
lrwxrwxrwx 1 allan allan 8 fev 24 17:45 dev/lib/libweb/ext-3.4.0/ext-core -> ext-core
(blinking red) Yeh, it's a symlink pointing to a missing file, or worst yet, pointing to itself. :) With -p: $ ~/go/bin/minify --match '\.(css|html|js|json)$' -sarp ./dev -o ./prod
ERROR: rename admin/js/Conf.js admin/js/Conf.js.bak: no such file or directory
... "lots of similar errors" ...
$ ls -l prod
total 0 |
Yes, you were a little faster than I expected! Haha, please try again, the Remember that the target of the symlink doesn't change (this is similar to the |
Hi! $ ~/go/bin/minify --version
minify v2.9.13-17-g273dcd6 Without -p: $ ~/go/bin/minify --match '\.(css|html|js|json)$' -sar ./dev -o ./hml
ERROR: stat dev/lib/libweb/ext-3.4.0/ext-core: too many levels of symbolic links With -p: $ ~/go/bin/minify --match '\.(css|html|js|json)$' -sarp ./dev -o ./hml
ERROR: symlink ../nesbot/carbon/bin/carbon hml/php/libs/vendor/bin/carbon: no such file or directory
$ ls -l dev/php/libs/vendor/bin/carbon
lrwxrwxrwx 1 allan allan 27 fev 24 17:46 dev/php/libs/vendor/bin/carbon -> ../nesbot/carbon/bin/carbon*
$ ls -l dev/php/libs/vendor/nesbot/carbon/bin/carbon
-rwxr-xr-x 1 allan allan 378 fev 24 17:46 dev/php/libs/vendor/nesbot/carbon/bin/carbon*
$ ls -l hml/php/libs/vendor/nesbot/carbon/bin/carbon
-rw-r--r-- 1 allan allan 378 mar 9 20:01 hml/php/libs/vendor/nesbot/carbon/bin/carbon
$ ls -l hml/php/libs/vendor/bin/carbon
ls: cannot access 'hml/php/libs/vendor/bin/carbon': no such file or directory |
Thanks again for the feedback. The recursive symlink is probably not something we need to fix, The other two issue, I don't follow 1), can you please explain it better so I can recreate he issue? And for 2) this is probably a separate issue, as we're not preserving file permissions and ownership anywhere (but we should). |
Regarding ownership and file permissions, doesn't seem like we can set those for symlinks in Go...it only applies to its target. |
Replicating the issue: $ mkdir -p dev/real dev/link; cd dev/link/; echo "console.log('Minify...'); console.log('me.');" > ../real/tst.js; ln -s ../real/tst.js; cd ../../; ~/go/bin/minify --match '\.(css|html|js|json)$' -sarp ./dev -o ./tst
false
ERROR: symlink ../real/tst.js tst/link/tst.js: no such file or directory |
It wasn't creating all the directories if they were missing, now it should work! |
Looks like it's broken. $ ~/go/bin/minify --version
minify v2.9.13-24-g81aab62
$ ~/go/bin/minify --match '\.(css|html|js|json)$' -sarpv dev/ -o tst
infer mimetype from file extensions
minify to output directory tst/
ERROR: open dev/: invalid argument
$ ~/go/bin/minify --match '\.(css|html|js|json)$' -sarv dev/ -o tst
infer mimetype from file extensions
minify to output directory tst/
ERROR: open dev/: invalid argument |
Ah sorry, how about now? |
Now it is working. $ ~/go/bin/minify --version
minify v2.9.14-1-g1635632
$ minify ./dev -o tst The only difference I noticed was this one: v2.9.14-1-g1635632: will create ./tst/dev/file.js |
Yes, this is because this way it reflects better how |
Oh sorry, dumb of me, just skipped the dot way in the tests.
|
I'm using minify as
The match files are getting minified, the other files are getting synced, but the symlinks are been ignored and my prod is getting non functional as a result.
There is a way to sync symlinks as well?
The text was updated successfully, but these errors were encountered: