tools icon indicating copy to clipboard operation
tools copied to clipboard

🐛 chmod should be performed at pkg creation time instead of with postinstall hook

Open castarco opened this issue 3 years ago • 0 comments

Environment information

yarn run v1.22.15
$ /home/castarco/Code/pencil4ts/node_modules/.bin/rome rage
CLI:
  Version:              10.0.1
  Color support:        true

Platform:
  CPU Architecture:     x86_64
  OS:                   linux

Environment:
  ROME_LOG_DIR:         unset
  NO_COLOR:             unset
  TERM:                 "xterm-256color"

Rome Configuration:
  Status:               loaded
  Formatter disabled:   false
  Linter disabled:      false

Workspace:
  Open Documents:       0

Discovering running Rome servers...

Running Rome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

i The client isn't connected to any server but rage discovered this running Rome server.

Server:
  Version:              10.0.1
  Name:                 rome_lsp
  CPU Architecture:     x86_64
  OS:                   linux

Workspace:
  Open Documents:       0

Other Active Server Workspaces:

Workspace:
  Open Documents:       1
  Client Name:          Visual Studio Code
  Client Version:       1.73.1

Workspace:
  Open Documents:       1
  Client Name:          Visual Studio Code
  Client Version:       1.73.1

Rome Server Log:

! Please review the content of the log file before sharing it publicly as it may contain sensitive information:
  * Path names that may reveal your name, a project name, or the name of your employer.
  * Source code

├─1632175ms INFO rome_lsp::server Starting Rome Language Server...

Done in 0.12s.

What happened?

  1. I had disabled postinstall scripts in my .npmrc file, to avoid/mitigate potential security issues.
  2. When I installed rome, I found it was failing. The reason was that the binary being called was not executable. After digging a bit, I discovered that this was happening because its "executable" flag depended on a postinstall hook being executed.

Expected result

The packaged binary should be executable from the very beginning. This can be done at packaging time, removing the need to call any postinstall hook.

Code of Conduct

  • [X] I agree to follow Rome's Code of Conduct

castarco avatar Nov 19 '22 18:11 castarco