Skip to content
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

Bin permissions #21

Closed
igbopie opened this issue Apr 3, 2018 · 10 comments
Closed

Bin permissions #21

igbopie opened this issue Apr 3, 2018 · 10 comments

Comments

@igbopie
Copy link

igbopie commented Apr 3, 2018

Hi!

I have a dependency with an executable file (like this one). I get a permissions error when I run it. I manually run chmod +x and everything goes fine. Maybe you can include that in the process.

Thanks!

@wclr
Copy link
Owner

wclr commented Apr 3, 2018

I'm not sure what you mean, how do you add the package in to the project, using yalc link? Which complete command do you run to modify permissions?

@igbopie
Copy link
Author

igbopie commented Apr 3, 2018

So, on the dependency I run yalc publish. The on the host: yalc update, but after that, I have to run chmod +x ./node_modules/.bin/[MYBINFILE], to make it work.

Initially yalc add.

@wclr
Copy link
Owner

wclr commented Apr 3, 2018

Ah I see, that because yalc update replaces the content in node_modules/package, hm maybe there could be added for example postupdate script that would be run on yalc update in the projects folder, what do you think?

Btw not sure why you modify /node_modules/.bin/[MYBINFILE] yalc should not touch files in /node_modules/.bin/. Hm.

@igbopie
Copy link
Author

igbopie commented Apr 3, 2018

I think /node_modules/.bin/XXX is a symbolic link to /node_modules/YOUR_PACKAGE/SOME_FILE_YOU_SPECIFY_ON_PACKAGE_JSON.

Yes, I think postupdate sounds fine! 👍

@igbopie
Copy link
Author

igbopie commented Apr 3, 2018

I guess yalc will need to check package.json for this (for example):

"bin": {
  "github-pages-commit": "bin/commit.js",
  "github-pages-push": "bin/push.js",
  "github-pages-deploy": "bin/deploy.js"
}

then perform postupdate task to chmod +x the bin files specified.

@wclr
Copy link
Owner

wclr commented Apr 3, 2018

Ok, I get you will check ASAP.

@diachedelic
Copy link

I am having this issue also - I don't want to have to manually chmod my bin folder every time I yalc push!

@wclr
Copy link
Owner

wclr commented Nov 22, 2018

There was handing of postupdate added, it will run in the host package directory while yalc updates package that has postupdate in scripts.

@aleclarson
Copy link
Contributor

Once #61 is merged, the link and add commands will support the bin field in package.json of yalc'd packages, which means the node_modules/.bin directory will be updated as expected. 😄

@eugeneoshepkov
Copy link

Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants