Revert "Remove WINDOWS-PREVIEW hack"

This reverts commit 84c0b3ccd8.
This commit is contained in:
Sashko Stubailo
2015-03-24 17:19:47 -07:00
parent 84c0b3ccd8
commit 31d199124f
2 changed files with 14 additions and 3 deletions

View File

@@ -994,5 +994,11 @@ exports.RemoteCatalog = RemoteCatalog;
// We put this constant here because we don't have any better place that would otherwise cause a cycle
exports.DEFAULT_TRACK = 'METEOR';
// XXX HACK for windows, because we don't have any working releases
// in other tracks
if (process.platform === "win32") {
exports.DEFAULT_TRACK = "WINDOWS-PREVIEW";
}
// The catalog as provided by troposhere (aka atomospherejs.com)
exports.official = new RemoteCatalog();

View File

@@ -387,10 +387,15 @@ exports.displayRelease = function (track, version, options) {
options = options || {};
var prefix = options.noPrefix ? "" : "Meteor ";
if (track === catalog.DEFAULT_TRACK) {
return prefix + version;
if (catalog.DEFAULT_TRACK !== "WINDOWS-PREVIEW") {
// XXX HACK for windows. In the bottom of catalog-remote.js, we make the
// default track for windows be "WINDOWS-PREVIEW", but we want `meteor
// --version` to actually show "WINDOWS-PREVIEW@x.y.z" instead of just
// "x.y.z".
if (track === catalog.DEFAULT_TRACK) {
return prefix + version;
}
}
return track + '@' + version;
};