mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
fix(cli): intermittent dependency installation failure (#207)
This commit is contained in:
parent
2cf606b1de
commit
04f488e349
@ -2,6 +2,7 @@ import type { PromptResult, ResolvedData } from './types.js'
|
||||
import path from 'node:path'
|
||||
import process from 'node:process'
|
||||
import { intro, outro, spinner } from '@clack/prompts'
|
||||
import { sleep } from '@pengzhanbo/utils'
|
||||
import { execaCommand } from 'execa'
|
||||
import colors from 'picocolors'
|
||||
import { Mode } from './constants.js'
|
||||
@ -21,6 +22,10 @@ export async function run(mode: Mode, root?: string) {
|
||||
|
||||
await generate(mode, data)
|
||||
|
||||
// Delay for some time, I/O may not be completed yet,
|
||||
// executing subsequent tasks at this point may cause issues.
|
||||
await sleep(200)
|
||||
|
||||
const cwd = path.join(process.cwd(), data.root)
|
||||
if (data.git) {
|
||||
progress.message(t('spinner.git'))
|
||||
|
||||
@ -23,6 +23,7 @@ jobs:
|
||||
{{#if (equal packageManager "pnpm")}}
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
{{/if}}
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user