diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 5514fe3c74..0d39040a98 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.3.4_3' + version: '1.3.4_4' }); Package.includeTool(); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index b37ea7b66f..b1b64812d8 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.3.4.3-rc.2", + "version": "1.3.4.4-rc.0", "recommended": false, "official": false, "description": "Meteor" diff --git a/scripts/admin/meteor-release-official.json b/scripts/admin/meteor-release-official.json index 0ef452a33d..f2f4992061 100644 --- a/scripts/admin/meteor-release-official.json +++ b/scripts/admin/meteor-release-official.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.3.4.3", + "version": "1.3.4.4", "recommended": false, "official": true, "description": "The Official Meteor Distribution" diff --git a/tools/cli/dev-bundle-links.js b/tools/cli/dev-bundle-links.js new file mode 100644 index 0000000000..b4de1464e0 --- /dev/null +++ b/tools/cli/dev-bundle-links.js @@ -0,0 +1,27 @@ +var fs = require("fs"); + +exports.makeLink = function (target, linkPath) { + var tempPath = linkPath + "-" + Math.random().toString(36).slice(2); + + try { + fs.symlinkSync(target, tempPath, "junction"); + } catch (e) { + fs.writeFileSync(tempPath, target, "utf8"); + } + + fs.renameSync(tempPath, linkPath); +}; + +exports.readLink = function (linkPath) { + var stat = fs.lstatSync(linkPath); + + if (stat.isSymbolicLink()) { + return fs.realpathSync(linkPath); + } + + if (stat.isFile()) { + return fs.readFileSync(linkPath, "utf8"); + } + + return linkPath; +}; diff --git a/tools/cli/dev-bundle.js b/tools/cli/dev-bundle.js index da6a06491f..286eb5d0a2 100644 --- a/tools/cli/dev-bundle.js +++ b/tools/cli/dev-bundle.js @@ -7,6 +7,7 @@ var fs = require("fs"); var path = require("path"); +var links = require("./dev-bundle-links.js"); var rootDir = path.resolve(__dirname, "..", ".."); var defaultDevBundlePromise = Promise.resolve(path.join(rootDir, "dev_bundle")); @@ -31,10 +32,10 @@ function getDevBundleDir() { "dev_bundle" ); - var devBundleStat = statOrNull(devBundleLink, "isDirectory"); + var devBundleStat = statOrNull(devBundleLink); if (devBundleStat) { return new Promise(function (resolve) { - resolve(fs.realpathSync(devBundleLink)); + resolve(links.readLink(devBundleLink)); }); } @@ -48,7 +49,7 @@ function getDevBundleDir() { return getDevBundleForRelease(release).then(function (devBundleDir) { if (devBundleDir) { - fs.symlink(devBundleDir, devBundleLink, "junction"); + links.makeLink(devBundleDir, devBundleLink); return devBundleDir; } diff --git a/tools/isobuild/meteor-npm-userconfig b/tools/isobuild/meteor-npm-userconfig index dbb8f15466..0cc575c925 100644 --- a/tools/isobuild/meteor-npm-userconfig +++ b/tools/isobuild/meteor-npm-userconfig @@ -1,2 +1,7 @@ -# This file intentionally left empty to ensure consistent npm -# configuration. +# These configuration options govern `npm` commands run on behalf of +# Meteor packages that have `Npm.depends` calls in their package.js files, +# not `meteor npm ...` commands. Because the developer is not running +# these commands herself, we don't care as much about helpful warnings, +# and we certainly don't want them to obscure actual errors. + +loglevel = error diff --git a/tools/project-context.js b/tools/project-context.js index 3442ca138f..34b3838757 100644 --- a/tools/project-context.js +++ b/tools/project-context.js @@ -1386,12 +1386,9 @@ _.extend(exports.ReleaseFile.prototype, { } } - files.symlink( - newTarget, - devBundleLink, - // Since the target is a directory, Windows can create a junction - // without needing administrator privileges. - "junction" + require("./cli/dev-bundle-links.js").makeLink( + files.convertToOSPath(newTarget), + files.convertToOSPath(devBundleLink) ); },