Compare commits

..

2 Commits

Author SHA1 Message Date
acbd1bf20c 🚀 Launch 1.0.1 2025-01-12 15:06:47 +08:00
a719ac8aeb 🐛 Bug fixes in launching 2025-01-12 15:06:30 +08:00
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "matrix-terminal", "name": "matrix-terminal",
"version": "1.0.0", "version": "1.0.1",
"description": "An Electron application with React and TypeScript", "description": "An Electron application with React and TypeScript",
"main": "./out/main/index.js", "main": "./out/main/index.js",
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",

View File

@ -103,13 +103,15 @@ export function launchApp(id: string): void {
const platform = process.platform const platform = process.platform
const runner = app.release.runners[platform] const runner = app.release.runners[platform]
const segments = runner.script.split(' ') const segments = runner.script.split(' ').map(decodeURIComponent)
try { try {
spawn(segments[0], segments.length > 1 ? segments.slice(1) : [], { const child = spawn(segments[0], segments.length > 1 ? segments.slice(1) : [], {
detached: true, detached: true,
cwd: runner.workdir ? join(app.basePath, runner.workdir) : app.basePath, cwd: runner.workdir ? join(app.basePath, runner.workdir) : app.basePath,
}) })
child.stdout.pipe(process.stdout)
child.stderr.pipe(process.stderr)
} catch (err: any) { } catch (err: any) {
console.error(err) console.error(err)
} }