fix(sdk): shorten bundled Python resource paths on Windows

This commit is contained in:
fz committed 2026-09-18 17:44:15 +08:00
1 parent 9d66716e50
commit defb9c3736
19 files changed
+63 -38

No files matched your search

+3 -1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env node
/** Private entry owned by the Python single-file runtime packaging. */
import { registerHooks } from 'node:module'
import { dirname, join } from 'node:path'
import { isSea } from 'node:sea'
import { fileURLToPath, pathToFileURL } from 'node:url'
@@ -30,7 +31,8 @@ if (aclRunner !== undefined && process.argv[2] === aclRunner) {
} else if (selection === undefined) {
if (isSea()) {
// Carrier default stays separate so process/home environment and profile patches can override it.
process.env.DSH_BUNDLED_PRIMARY_RUNTIME = `${process.execPath.replace(/\.exe$/i, '')}-resources/primary-runtime`
const platform = process.platform === 'darwin' ? 'macos' : process.platform === 'win32' ? 'win' : process.platform
process.env.DSH_BUNDLED_PRIMARY_RUNTIME = join(dirname(process.execPath), `${platform}-${process.arch}`, 'primary-runtime')
}
const { runCli } = await import('@deepseek-ai/dsh/lib/bin.js')
await runCli()