mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Only unload package if it is loaded
This commit is contained in:
@@ -64,7 +64,7 @@ uninstall = ({name}, callback) ->
|
||||
apmProcess = spawn(apm, ['uninstall', name])
|
||||
apmProcess.on 'close', (code) =>
|
||||
if code is 0
|
||||
atom.unloadPackage(name)
|
||||
atom.unloadPackage(name) if atom.isPackageLoaded(name)
|
||||
callback()
|
||||
else
|
||||
callback(new Error("Uninstalling '#{name}' failed."))
|
||||
|
||||
Reference in New Issue
Block a user