Skip to content

ppm install --check can run afoul of permissions #145

@savetheclocktower

Description

@savetheclocktower

Thanks in advance for your bug report!

  • Have you reproduced issue in safe mode?
  • Have you used the debugging guide to try to resolve the issue?
  • Have you checked our FAQs to make sure your question isn't answered there?
  • Have you checked to make sure your issue does not already exist?
  • Have you checked you are on the latest release of Pulsar?

What happened?

This is a bug report from the wild, but someone on Discord reported that pulsar -p install check produced this output:

gyp ERR! configure error
gyp ERR! stack Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Pulsar\resources\app\ppm\native-module\build'
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\Program Files\Pulsar\resources\app\ppm\bin\node.exe" "C:\Program Files\Pulsar\resources\app\ppm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Program Files\Pulsar\resources\app\ppm\native-module
gyp ERR! node -v v16.0.0
gyp ERR! node-gyp -v v9.4.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! module-with-native-code@ install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the module-with-native-code@ install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

I can only assume the cause is the failure to create a directory in C:\Program Files\Pulsar\resources\app\ppm\, and that's fair; seems like Pulsar was installed globally and the user isn't running as an administrator.

We might instead want to use a temporary directory here instead of assuming the current user can write to ppm's location.

Pulsar version

1.122

Which OS does this happen on?

🪟 Windows

OS details

(unknown Windows version)

Which CPU architecture are you running this on?

None

What steps are needed to reproduce this?

  • Install Pulsar for all users
  • Open a regular, non-administrator command prompt
  • Run ppm install --check

I haven't tried this myself, but the symptoms here are strongly pointing me toward these reproduction steps. Hopefully a Windows user out there can verify.

Additional Information:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions