mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] format
This commit is contained in:
parent
3e46634fd5
commit
7d7920ea91
1 changed files with 15 additions and 7 deletions
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue