Skip to content

Commit

Permalink
1.3-1 修复服务器运行目录问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Hikari16665 committed Jul 1, 2024
1 parent f09733e commit 453a198
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,16 @@ def run(self):
run_command = f'{self.javaPath} -Dfile.encoding=utf-8 -Xmx{self.maxRam} -jar forge-{mcVersion}-{forgeVersion}.jar'
console.log(f'Run Command: {run_command}')

workdir = self.path
if self.config.direct_mode:
workdir = ''

output_queue = Queue()
input_queue = Queue()

process = subprocess.Popen(
run_command.split(" "),
cwd=self.path,
cwd=workdir,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
Expand Down

0 comments on commit 453a198

Please sign in to comment.