mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Dont remove symlinked autocomplete-plus packages
This commit is contained in:
@@ -845,13 +845,16 @@ describe "PackageManager", ->
|
||||
|
||||
jasmine.unspy(atom.packages, 'uninstallAutocompletePlus')
|
||||
|
||||
afterEach ->
|
||||
try
|
||||
fs.unlink autocompletePlusPath, ->
|
||||
|
||||
it "removes the packages", ->
|
||||
atom.packages.loadPackages()
|
||||
|
||||
waitsFor ->
|
||||
not fs.isDirectorySync(autocompleteCSSPath) and
|
||||
not fs.isSymbolicLinkSync(autocompletePlusPath)
|
||||
not fs.isDirectorySync(autocompleteCSSPath)
|
||||
|
||||
runs ->
|
||||
expect(fs.isDirectorySync(autocompleteCSSPath)).toBe false
|
||||
expect(fs.isSymbolicLinkSync(autocompletePlusPath)).toBe false
|
||||
expect(fs.isSymbolicLinkSync(autocompletePlusPath)).toBe true
|
||||
|
||||
@@ -443,9 +443,7 @@ class PackageManager
|
||||
|
||||
Promise.all([symlinkPromise, dirPromise]).then (values) ->
|
||||
[isSymLink, isDir] = values
|
||||
if isSymLink
|
||||
fs.unlink directory, ->
|
||||
else if isDir
|
||||
if not isSymLink and isDir
|
||||
fs.remove directory, ->
|
||||
|
||||
if Grim.includeDeprecatedAPIs
|
||||
|
||||
Reference in New Issue
Block a user