Skip to content

Commit

Permalink
chore(outputs) - improve logs when installing packages on capsule (#7202
Browse files Browse the repository at this point in the history
)
  • Loading branch information
GiladShoham authored Mar 27, 2023
1 parent c0567ac commit c7823d3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions scopes/component/isolator/isolator.main.runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,11 @@ export class IsolatorMain {
if (installOptions.installPackages) {
const cachePackagesOnCapsulesRoot = opts.cachePackagesOnCapsulesRoot ?? false;
const linkingOptions = opts.linkingOptions ?? {};
const longProcessLogger = this.logger.createLongProcessLogger('install packages');
let longProcessLogger;
// Only show the log message in case we are going to install something
if (capsuleList && capsuleList.length){
longProcessLogger = this.logger.createLongProcessLogger('install packages in capsules');
}
if (installOptions.useNesting) {
await Promise.all(
capsuleList.map(async (capsule) => {
Expand Down Expand Up @@ -360,8 +364,10 @@ export class IsolatorMain {
linkedDependencies,
});
}
longProcessLogger.end();
this.logger.consoleSuccess();
if (longProcessLogger){
longProcessLogger.end();
this.logger.consoleSuccess('installed packages in capsules');
}
}

// rewrite the package-json with the component dependencies in it. the original package.json
Expand Down

0 comments on commit c7823d3

Please sign in to comment.