fixes
This commit is contained in:
parent
e25ded9e24
commit
58d0635658
@ -3,13 +3,6 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -76,10 +76,20 @@ namespace NadekoBot.Core.Services.Impl
|
||||
if (!string.IsNullOrWhiteSpace(cmd))
|
||||
RestartCommand = new RestartConfig(cmd, args);
|
||||
|
||||
if (string.IsNullOrWhiteSpace(ShardRunCommand))
|
||||
ShardRunCommand = "dotnet";
|
||||
if (string.IsNullOrWhiteSpace(ShardRunArguments))
|
||||
ShardRunArguments = "run -c Release -- {0} {1}";
|
||||
if (Environment.OSVersion.Platform == PlatformID.Unix)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(ShardRunCommand))
|
||||
ShardRunCommand = "dotnet";
|
||||
if (string.IsNullOrWhiteSpace(ShardRunArguments))
|
||||
ShardRunArguments = "run -c Release -- {0} {1}";
|
||||
}
|
||||
else //windows
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(ShardRunCommand))
|
||||
ShardRunCommand = "NadekoBot.exe";
|
||||
if (string.IsNullOrWhiteSpace(ShardRunArguments))
|
||||
ShardRunArguments = "{0} {1}";
|
||||
}
|
||||
|
||||
var portStr = data[nameof(ShardRunPort)];
|
||||
if (string.IsNullOrWhiteSpace(portStr))
|
||||
|
@ -293,6 +293,8 @@ namespace NadekoBot.Core.Services
|
||||
|
||||
private Process StartShard(int shardId)
|
||||
{
|
||||
Console.WriteLine(_creds.ShardRunCommand);
|
||||
Console.WriteLine(_creds.ShardRunArguments);
|
||||
return Process.Start(new ProcessStartInfo()
|
||||
{
|
||||
FileName = _creds.ShardRunCommand,
|
||||
|
Loading…
Reference in New Issue
Block a user