tools icon indicating copy to clipboard operation
tools copied to clipboard

fix: apply chmod at pkg creation time

Open castarco opened this issue 3 years ago • 1 comments

Summary

  • Apply chmod at package creation time instead of doing it when running the postinstall hook.
  • I did not disabled postinstall hook entirely because it can give interesting information to users, I just removed the part where it applies chmod (because it's supposed to be done before, at package creation time).

Fixes #3799 .

Test Plan

Testing this change is not trivial because it impacts CD pipelines. My suggestion:

  1. make an alpha/beta/rc release, to avoid risking users' installations.
  2. Modify your local .npmrc file, by adding this line: ignore-scripts=true
  3. Install this alpha/beta/rc package version, and check that the installed binary has execution permissions, even when the postinstall hook has not been triggered because of our change on the .npmrc config file.

As a side note, it would be great if some of the steps that are being executed in the CD pipeline were extracted into scripts that we could run locally. This way it would be easier to test some of these details. I'm not doing that in this PR because I believe it deserves some prior discussion, and I don't want to mix too many things in a single PR.


Signed-off-by: Andres Correa Casablanca [email protected]

castarco avatar Nov 19 '22 18:11 castarco

Deploy Preview for docs-rometools canceled.

Built without sensitive environment variables

Name Link
Latest commit fc19e899d9175903346adc642670c9bcf26dc7d0
Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/6379277abeda4e0009c1c671

netlify[bot] avatar Nov 19 '22 18:11 netlify[bot]