mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix crash when downloading second package build
The logic to figure out which build dirs are temp dirs which need to be
freed and which are not was wrong, since it missed the non-temp
files.pathResolve(files.pathDirname(packagePath),
packageLinkTarget));
Use a more explicit way of tracking this.
(Fixed merge conflict when merging from devel.)
This commit is contained in:
@@ -303,10 +303,11 @@ _.extend(exports.Tropohouse.prototype, {
|
||||
buildmessage.enterJob({
|
||||
title: "downloading " + packageName + "@" + version + "..."
|
||||
}, function() {
|
||||
var buildInputDirs = [];
|
||||
var buildTempDirs = [];
|
||||
// If there's already a package in the tropohouse, start with it.
|
||||
if (packageLinkTarget) {
|
||||
buildTempDirs.push(
|
||||
buildInputDirs.push(
|
||||
files.pathResolve(files.pathDirname(packageLinkFile),
|
||||
packageLinkTarget));
|
||||
}
|
||||
@@ -315,20 +316,22 @@ _.extend(exports.Tropohouse.prototype, {
|
||||
// warehouse?
|
||||
_.each(buildsToDownload, function (build) {
|
||||
try {
|
||||
buildTempDirs.push(self._downloadBuildToTempDir(
|
||||
{ packageName: packageName, version: version }, build));
|
||||
var buildTempDir = self._downloadBuildToTempDir(
|
||||
{ packageName: packageName, version: version }, build);
|
||||
} catch (e) {
|
||||
if (!(e instanceof files.OfflineError))
|
||||
throw e;
|
||||
buildmessage.error(e.error.message);
|
||||
}
|
||||
buildInputDirs.push(buildTempDir);
|
||||
buildTempDirs.push(buildTempDir);
|
||||
});
|
||||
if (buildmessage.jobHasMessages())
|
||||
return;
|
||||
|
||||
// We need to turn our builds into a single isopack.
|
||||
var isopack = new Isopack;
|
||||
_.each(buildTempDirs, function (buildTempDir, i) {
|
||||
_.each(buildInputDirs, function (buildTempDir, i) {
|
||||
isopack._loadUnibuildsFromPath(
|
||||
packageName,
|
||||
buildTempDir,
|
||||
|
||||
Reference in New Issue
Block a user