no more warehouses in checkouts

This commit is contained in:
David Glasser
2013-02-25 18:56:19 -08:00
parent 64976872e9
commit 431ff65731

View File

@@ -12,6 +12,11 @@
/// packages/
/// foo/
/// x.y.z/
///
/// We never use a warehouse when we're running the engine from a checkout. The
/// only functions in this file that you can call before checking if you're in a
/// checkout are releaseManifestForApp and releaseManifestByVersion, both of
/// which will return null in a checkout.
var path = require("path");
var fs = require("fs");
@@ -29,17 +34,17 @@ var PACKAGES_URLBASE = 'https://packages.meteor.com';
var warehouse = module.exports = {
// Return our loaded collection of engines, releases and
// packages. If we're running an installed version, found at
// $HOME/.meteor. If we're running a checkout, found at
// $CHECKOUT/.meteor.
// $HOME/.meteor.
getWarehouseDir: function () {
// a hook for tests
if (process.env.TEST_WAREHOUSE_DIR)
return process.env.TEST_WAREHOUSE_DIR;
// This function should never be called if we're in a checkout.
if (files.in_checkout())
return path.join(files.getCurrentEngineDir(), '.meteor');
else
return path.join(process.env.HOME, '.meteor');
throw new Error("There's no warehouse in a checkout");
return path.join(process.env.HOME, '.meteor');
},
getEngineDir: function (version) {