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

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

Open
5 tasks done
savetheclocktower opened this issue Oct 30, 2024 · 0 comments
Open
5 tasks done

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

savetheclocktower opened this issue Oct 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@savetheclocktower
Copy link
Contributor

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

@savetheclocktower savetheclocktower added the bug Something isn't working label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant