🐛 update actions work

This commit is contained in:
Tw93
2025-08-14 11:52:37 +08:00
parent 81eae9627a
commit 7b74b7fc15
5 changed files with 22 additions and 7 deletions

View File

@@ -58,15 +58,19 @@ export default abstract class BaseBuilder {
? ' --registry=https://registry.npmmirror.com'
: '';
// Windows环境下需要更长的超时时间
const timeout = process.platform === 'win32' ? 600000 : 300000;
if (isChina) {
logger.info('✺ Located in China, using npm/rsProxy CN mirror.');
const projectCnConf = path.join(tauriSrcPath, 'rust_proxy.toml');
await fsExtra.copy(projectCnConf, projectConf);
await shellExec(
`cd "${npmDirectory}" && ${packageManager} install${registryOption}`,
timeout,
);
} else {
await shellExec(`cd "${npmDirectory}" && ${packageManager} install`);
await shellExec(`cd "${npmDirectory}" && ${packageManager} install`, timeout);
}
spinner.succeed(chalk.green('Package installed!'));
if (!tauriTargetPathExists) {