You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When there are files that have permissions incompatible with whatever yarn bundle does with them (or yarn/fslib does with them), adding such files to .bundleignore does not help because apparently ignoring happens later on in the pipeline.
In my case, I'm using nix + direnv, which creates a .direnv directory that contains symlinks to readonly files somewhere else on the system. Even if I add .direnv to .bundleignore, yarn bundle copies them to a temp dir and then runs chmod on them, which fails.
To Reproduce
Steps to reproduce the behavior:
cd into a project that uses yarn v2/v3 workspaces
touch ~/bar need a file somewhere else for this reproduction
sudo chown root ~/bar root or any other user, any user other than yours.
sudo chmod 0444 ~/bar make it readonly for everybody.
ln -s ~/bar foo gotta create a symlink for reproduction
Add foo to .bundleignore
cd into a workspace and run yarn bundle.
I think this can also be reproduced by creating a symlink to a non-existing path.
Expected behavior
Everything works fine.
Actual behavior EPERM: operation not permitted, chmod '<omitted tmp dir path>/foo'
Desktop (please complete the following information):
MacOS
Additional info
This could be solved by not even copying ignored dirs/files to a tmp dir for further processing.
The text was updated successfully, but these errors were encountered:
anilanar
changed the title
Ignore doesn't ignore while copying files to temp dir
bundleignore doesn't ignore while copying files to temp dir
Apr 24, 2022
Describe the bug
When there are files that have permissions incompatible with whatever yarn bundle does with them (or yarn/fslib does with them), adding such files to .bundleignore does not help because apparently ignoring happens later on in the pipeline.
In my case, I'm using nix + direnv, which creates a
.direnv
directory that contains symlinks to readonly files somewhere else on the system. Even if I add.direnv
to.bundleignore
,yarn bundle
copies them to a temp dir and then runschmod
on them, which fails.To Reproduce
Steps to reproduce the behavior:
touch ~/bar
need a file somewhere else for this reproductionsudo chown root ~/bar
root or any other user, any user other than yours.sudo chmod 0444 ~/bar
make it readonly for everybody.ln -s ~/bar foo
gotta create a symlink for reproduction.bundleignore
yarn bundle
.I think this can also be reproduced by creating a symlink to a non-existing path.
Expected behavior
Everything works fine.
Actual behavior
EPERM: operation not permitted, chmod '<omitted tmp dir path>/foo'
Desktop (please complete the following information):
Additional info
This could be solved by not even copying ignored dirs/files to a tmp dir for further processing.
The text was updated successfully, but these errors were encountered: