mirror of
https://github.com/iconify/iconify.git
synced 2024-12-12 13:47:49 +00:00
fix: miss
This commit is contained in:
parent
3107db9488
commit
27911a5447
@ -8,7 +8,7 @@ const tasks: Record<string, Promise<void> | undefined> = {};
|
||||
|
||||
export async function tryInstallPkg(
|
||||
name: string,
|
||||
autoInstall = true
|
||||
autoInstall: boolean | ((name: string) => Promise<void | undefined>)
|
||||
): Promise<void | undefined> {
|
||||
if (pending) {
|
||||
await pending;
|
||||
@ -18,8 +18,7 @@ export async function tryInstallPkg(
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(cyan(`Installing ${name}...`));
|
||||
if (typeof autoInstall === 'function') {
|
||||
tasks[name] = pending = autoInstall
|
||||
.customInstall(name)
|
||||
tasks[name] = pending = autoInstall(name)
|
||||
.then(() => sleep(300))
|
||||
.finally(() => {
|
||||
pending = undefined;
|
||||
|
Loading…
Reference in New Issue
Block a user