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

Comments

Projects
None yet
5 participants
@igbopie
Copy link

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!

@whitecolor

This comment has been minimized.

Copy link
Owner

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

This comment has been minimized.

Copy link
Author

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.

@whitecolor

This comment has been minimized.

Copy link
Owner

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Author

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.

@whitecolor

This comment has been minimized.

Copy link
Owner

commented Apr 3, 2018

Ok, I get you will check ASAP.

@diachedelic

This comment has been minimized.

Copy link

commented Sep 24, 2018

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

@whitecolor

This comment has been minimized.

Copy link
Owner

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

This comment has been minimized.

Copy link
Contributor

commented Dec 30, 2018

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

This comment has been minimized.

Copy link

commented Feb 27, 2019

Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.