Skip to content

Commit

Permalink
Merge pull request #9 from vingard/dev
Browse files Browse the repository at this point in the history
srcds fix probably?
  • Loading branch information
vingard authored Sep 1, 2023
2 parents 6ba1a52 + 5e39a6d commit 0de0ea1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions release/app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion release/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tactical-intervention-revived",
"version": "1.0.6",
"version": "1.0.7",
"description": "",
"license": "MIT",
"author": "vin",
Expand Down
11 changes: 9 additions & 2 deletions src/main/core/server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import log from "electron-log"
import { spawn } from "child_process"
import { execFile, spawn, exec } from "child_process"
import srcdsQuery from "source-server-query"

import * as appPath from "./appPath"
Expand All @@ -21,7 +21,14 @@ export async function start(args: string = "") {
}

await game.setTempCfg(`${baseArgs}\n\n${args}`)
const instance = spawn(`${appPath.srcdsPath}`, {shell: true})

let instance

try {
instance = execFile(`${appPath.srcdsPath}`, {shell: true})
} catch(err) {
throw new SoftError(`Failed to create dedicated server - ${err}`)
}

instance.on("exit", (code) => {
//setTempCfg("")
Expand Down

0 comments on commit 0de0ea1

Please sign in to comment.