apm
apm copied to clipboard
apm never runs preuninstall script
Prerequisites
- [X] Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
I have a preuninstall script which needs to run to uninstall atom-xterm (see https://github.com/amejia1/atom-xterm/blob/8d9507b231e8fccb7f8395b810be6b13d3a1d697/package.json#L49). When I attempt to uninstall atom-xterm on Windows, it fails with the following message.
Failed to delete atom-xterm: EPERM: operation no permitted, unlink 'C:\Users\andre.atom\packages\atom-xterm\node_modules\node-pty\build\Release\pty.node'
My preuninstall script is suppose to deal with this by renaming the DLLs instead (as recommended here https://msdn.microsoft.com/en-us/library/windows/desktop/ms682604(v=vs.85).aspx). This is also related to my other issue at https://github.com/atom/apm/issues/743 .
Steps to Reproduce
- Install atom-xterm for Atom on Windows.
- Ensure atom-xterm was not installed/updated more than once in the same Atom session (or simply restart Atom).
- Try uninstalling atom-xterm, the above mentioned error should appear.
Expected behavior: atom-xterm should have simply been uninstalled.
Actual behavior: An error message appeared and atom-xterm was not uninstalled.
Reproduces how often: Always.
Versions
You can get this information from copy and pasting the output of atom --version
and apm --version
from the command line. Also, please include the OS and what version of the OS you're running.
PS C:\Users\andre\github\atom-xterm> apm --version apm --version apm 1.18.4 npm 3.10.10 node 6.9.5 x64 python 2.7.13 git 2.14.0.windows.2 visual studio 2015
Using Windows 10.
Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue.