mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
don't crash when removing a nonexistent package
This commit is contained in:
@@ -1757,12 +1757,9 @@ main.registerCommand({
|
||||
maxArgs: Infinity,
|
||||
requiresApp: true
|
||||
}, function (options) {
|
||||
// Refresh the catalog, checking the remote package data on the
|
||||
// server. Technically, we don't need to do this, since it is unlikely that
|
||||
// new data will change our constraint solver decisions. But as a user, I
|
||||
// would expect this command to update the local catalog.
|
||||
// XXX what if we're offline?
|
||||
refreshOfficialCatalogOrDie();
|
||||
// As user may expect this to update the catalog, but we con't actually need
|
||||
// to, and it takes frustratingly long.
|
||||
// refreshOfficialCatalogOrDie();
|
||||
|
||||
// Read in existing package dependencies.
|
||||
var packages = project.getConstraints();
|
||||
@@ -1786,8 +1783,9 @@ main.registerCommand({
|
||||
|
||||
var messages = buildmessage.capture(function () {
|
||||
// Get the contents of our versions file, we will want them in order to
|
||||
// remove to the user what we removed.
|
||||
var versions = project.getVersions();
|
||||
// remove to the user what we removed. Note that we are actually just getting
|
||||
// getting the versions file, not running the constraint solver.
|
||||
var versions = project.dependencies;
|
||||
|
||||
// Remove the packages from the project! There is really no way for this to
|
||||
// fail, unless something has gone horribly wrong, so we don't need to check
|
||||
|
||||
Reference in New Issue
Block a user