mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Add try/except for not finding run file
This commit is contained in:
parent
af10353119
commit
d5cc4529b0
@ -587,6 +587,7 @@ class ServerInstance:
|
||||
|
||||
# We need to grab the exact forge version number.
|
||||
# We know we can find it here in the run.sh/bat script.
|
||||
try:
|
||||
run_file_path = ""
|
||||
if self.helper.is_os_windows():
|
||||
run_file_path = os.path.join(server_obj.path, "run.bat")
|
||||
@ -621,13 +622,17 @@ class ServerInstance:
|
||||
)
|
||||
# Now lets set up the new run command.
|
||||
# This is based off the run.sh/bat that
|
||||
# Forge uses in 1.16 and <
|
||||
# Forge uses in 1.17 and <
|
||||
execution_command = (
|
||||
f"java @{server_command[0]}"
|
||||
f" @{executable_path}{server_command[3]} nogui {server_command[4]}"
|
||||
f" @{executable_path}{server_command[3]} nogui"
|
||||
" {server_command[4]}"
|
||||
)
|
||||
server_obj.execution_command = execution_command
|
||||
Console.debug("SUCCESS! Forge install completed")
|
||||
except:
|
||||
logger.debug("Could not find run file.")
|
||||
# TODO Use regex to get version and rebuild simple execution
|
||||
|
||||
# We'll update the server with the new information now.
|
||||
HelperServers.update_server(server_obj)
|
||||
|
Loading…
Reference in New Issue
Block a user