Skip to content

Formerly KrillinAI, VideoTranslation and Dubbing Tool for 120+ Languages. Open-source AI workspace for creators, powered by Codex. Video downloader, video translation, create videos, images, audios, and edits with Agents in one place. For your Social Media like YouTube, TikTok, Instagram, etc.

fix(packaging): recover from Windows curl access violations [package only]

Leggettcb4f7fcf72b6
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 71b47ab8..ee4aada7 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -17,6 +17,7 @@ concurrency:
jobs:
classify:
+ if: github.event_name != 'push' || !contains(github.event.head_commit.message, '[package only]')
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
diff --git a/apps/desktop/scripts/creator-nlp-runtime.mjs b/apps/desktop/scripts/creator-nlp-runtime.mjs
index e5017b58..386bd0b6 100644
--- a/apps/desktop/scripts/creator-nlp-runtime.mjs
+++ b/apps/desktop/scripts/creator-nlp-runtime.mjs
@@ -32,7 +32,16 @@ export function installCreatorNlpDependencies({ vendorRoot, platform, arch, offl
const args = ['--fail', '--silent', '--show-error', '--location', '--retry', '3', '--connect-timeout', '20', '--max-time', '180'];
if (proxy) args.push('--proxy', proxy);
args.push('--output', temporary, wheel.url);
- run('curl', args, { stdio: 'inherit' });
+ try {
+ run('curl', args, { stdio: 'inherit' });
+ } catch (error) {
+ // curl's internal retries cannot recover when the Windows process crashes.
+ const gitCurl = join(process.env.ProgramFiles ?? 'C:\\Program Files', 'Git', 'mingw64', 'bin', 'curl.exe');
+ if (process.platform !== 'win32' || (error?.status >>> 0) !== 0xc0000005 || !existsSync(gitCurl)) throw error;
+ rmSync(temporary, { force: true });
+ console.warn('[creator-nlp] curl crashed with 0xC0000005; retrying with Git for Windows curl');
+ run(gitCurl, args, { stdio: 'inherit', windowsHide: true });
+ }
if (hashFile(temporary) !== wheel.sha256) throw new Error(`spaCy wheel SHA-256 mismatch: ${wheel.fileName}`);
rmSync(path, { force: true });
renameSync(temporary, path);