Only disable a package if it isn't already disabled

This commit is contained in:
Machiste Quintana
2016-01-10 09:38:12 -05:00
committed by Machiste Quintana
parent e7f15d06e4
commit 78543a7a34

View File

@@ -199,7 +199,10 @@ class PackageManager
# Returns the {Package} that was disabled or null if it isn't loaded.
disablePackage: (name) ->
pack = @loadPackage(name)
pack?.disable()
unless @isPackageDisabled(name)
pack?.disable()
pack
# Public: Is the package with the given name disabled?