diff --git a/tools/catalog-remote.js b/tools/catalog-remote.js index dfd1b53adb..f7c8c5b174 100644 --- a/tools/catalog-remote.js +++ b/tools/catalog-remote.js @@ -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(); diff --git a/tools/utils.js b/tools/utils.js index cc0a9a08f4..0f0d0f93e1 100644 --- a/tools/utils.js +++ b/tools/utils.js @@ -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; };