Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions RLBotCS/ManagerTools/ConfigParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,16 +225,21 @@ private PlayerClass GetAgentType(TomlTable table)

private string GetRunCommand(TomlTable runnableSettings)
{
string runCommandWindows = GetValue<string>(
runnableSettings,
Fields.AgentRunCommand,
""
);
string runCommandWindows = GetValue(runnableSettings, Fields.AgentRunCommand, "");

#if WINDOWS
return runCommandWindows;
#else
return GetValue(runnableSettings, Fields.AgentRunCommandLinux, runCommandWindows);
string runCommandLinux = GetValue(runnableSettings, Fields.AgentRunCommandLinux, "");

if (!string.IsNullOrEmpty(runCommandLinux))
return runCommandLinux;

// No Linux run command specified; try to run the Windows command via Wine.
if (!string.IsNullOrEmpty(runCommandWindows))
return $"wine {runCommandWindows}";

return "";
#endif
}

Expand Down
Loading