Skip to content

Commit

Permalink
chore(deploy-script-support): Lookup the agoricNames installation adm…
Browse files Browse the repository at this point in the history
…in only when necessary
  • Loading branch information
gibson042 authored and mhofman committed Jan 19, 2024
1 parent d7c838d commit 59a4a8f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions packages/deploy-script-support/src/coreProposalBehavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,16 @@ export const makeCoreProposalBehavior = ({
);

// Publish the installations for our dependencies.
const installAdmin = E(agoricNamesAdmin).lookupAdmin('installation');
await Promise.all(
entries(installations || {}).map(([key, value]) => {
produceInstallations[key].resolve(value);
return E(installAdmin).update(key, value);
}),
);
const installationEntries = entries(installations || {});
if (installationEntries.length > 0) {
const installAdmin = E(agoricNamesAdmin).lookupAdmin('installation');
await Promise.all(
installationEntries.map(([key, value]) => {
produceInstallations[key].resolve(value);
return E(installAdmin).update(key, value);
}),
);
}

// Evaluate the manifest.
return runModuleBehaviors({
Expand Down

0 comments on commit 59a4a8f

Please sign in to comment.