From 16c4a08fdee723e07ad6e9cb751a8198580e6b13 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Tue, 3 Sep 2024 15:21:42 +0800 Subject: [PATCH] fix(docset): resolve error during docset file generation. #601 --- scripts/dash.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/dash.mjs b/scripts/dash.mjs index fc518caa074..fc62b40f9b5 100644 --- a/scripts/dash.mjs +++ b/scripts/dash.mjs @@ -118,7 +118,9 @@ async function build() { console.info('compressing tgz'); // https://github.com/node-modules/compressing/issues/42 建议最好休眠15s,等待其余资源复制完毕 - spawn("sleep", ['15']) + // 确保所有操作完成后再压缩 + await new Promise(resolve => setTimeout(resolve, 30000)); // 增加到 30 秒 + const outputPath = pathJoin(process.cwd(), '.deploy', 'linux-command.docset.tgz'); await tgz.compressDir(DOCSET_DIR, outputPath); }