Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

Commit

Permalink
changing extension-from-marketplace install to be sequential, not par…
Browse files Browse the repository at this point in the history
…allel

Seems that when it's in parallel you get write locks on the logfile which causes most installs to fail, but it wasn't reported as a failure
  • Loading branch information
aaronpowell committed Jul 25, 2019
1 parent 405d5ea commit b747b6f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/services/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ class ExtensionHelper {
if (!installed) {
try {
const cli = `${binaryFullPath} --install-extension ${ext.publisherId}`;
await exec(cli);
let result = await exec(cli);
logger.appendLine(result.stdout);
logger.appendLine(
`Extension ${name} was installed from the marketplace.`
);
Expand Down Expand Up @@ -175,15 +176,15 @@ class ExtensionHelper {
logger.appendLine("");
logger.appendLine("");

let installs = newExtensions.map((ext, i) => {
let codeBinary = this.settings.getCodeBinary();
for (let i = 0; i < newExtensions.length; i++) {
let ext = newExtensions[i];
logger.appendLine(
`Installing ${ext.name} (${i + 1} of ${newExtensions.length})`
);
logger.appendLine("");
return this.installExtension(ext, this.settings.getCodeBinary(), logger);
});

await Promise.all(installs);
await this.installExtension(ext, codeBinary, logger);
}
}
}

Expand Down

0 comments on commit b747b6f

Please # to comment.