Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re authored and astrobot-houston committed Aug 14, 2023
1 parent 3e46634 commit 7d7920e
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions packages/astro/src/cli/add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -637,11 +637,14 @@ async function getInstallIntegrationsCommand({
// Allow forwarding of standard `npm install` flags
// See https://docs.npmjs.com/cli/v8/commands/npm-install#description
const INHERITED_FLAGS = new Set<string>([
"P", "save-prod",
"D", "save-dev",
"E", "save-exact",
"no-save",
])
'P',
'save-prod',
'D',
'save-dev',
'E',
'save-exact',
'no-save',
]);

async function tryToInstallIntegrations({
integrations,
Expand Down Expand Up @@ -673,7 +676,7 @@ async function tryToInstallIntegrations({
const coloredOutput = `${bold(installCommand.pm)} ${installCommand.command}${[
'',
...installCommand.flags,
...inheritedFlags
...inheritedFlags,
].join(' ')} ${cyan(installCommand.dependencies.join(' '))}`;
const message = `\n${boxen(coloredOutput, {
margin: 0.5,
Expand All @@ -693,7 +696,12 @@ async function tryToInstallIntegrations({
try {
await execa(
installCommand.pm,
[installCommand.command, ...installCommand.flags, ...inheritedFlags, ...installCommand.dependencies],
[
installCommand.command,
...installCommand.flags,
...inheritedFlags,
...installCommand.dependencies,
],
{ cwd }
);
spinner.succeed();
Expand Down

0 comments on commit 7d7920e

Please sign in to comment.