Skip to content

Commit 8945b98

Browse files
author
Me
committed
Fixed Linux build
1 parent ff81b78 commit 8945b98

1 file changed

Lines changed: 19 additions & 11 deletions

File tree

sql_profiler/Program.cs

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11

2+
using System;
3+
24
namespace sql_profiler
35
{
46

@@ -280,8 +282,8 @@ public static string GetPlatformDefaultInstance()
280282

281283
static void Main(string[] args)
282284
{
283-
MainTest(args);
284-
// DoProfiling(args);
285+
// MainTest(args);
286+
DoProfiling(args);
285287
}
286288

287289

@@ -292,23 +294,29 @@ static void MainTest(string[] args)
292294
// string ar = $"--server {instance} --username WebAppWebServices --password TOP_SECRET --Db COR_Basic_Demo_V4";
293295

294296
string ar = $"--server {instance} /db \"COR_Basic_Demo_V4\"";
295-
ar = $"--server {instance} /db \"SwissRe_Test_V4\"";
296-
297+
297298
bool isWindows = System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(
298299
System.Runtime.InteropServices.OSPlatform.Windows
299300
);
300-
301+
301302
if(!isWindows)
302303
{
303-
string un = TestPlotly.SecretManager.GetSecret<string>("DefaultDbUser");
304-
string pw = TestPlotly.SecretManager.GetSecret<string>("DefaultDbPassword");
305-
ar = $"--server {instance} --username {un} --password {pw} --db \"Redmine\"";
304+
try
305+
{
306+
string un = TestPlotly.SecretManager.GetSecret<string>("DefaultDbUser");
307+
string pw = TestPlotly.SecretManager.GetSecret<string>("DefaultDbPassword");
308+
ar = $"--server {instance} --username {un} --password {pw} --db \"Redmine\"";
309+
}
310+
catch (Exception e)
311+
{
312+
Console.WriteLine(e);
313+
throw;
314+
}
306315
}
307-
316+
308317
DoProfiling(ar.Split(' '));
309318
} // End Sub Main
310-
311-
319+
312320

313321
static void DoProfiling(string[] args)
314322
{

0 commit comments

Comments
 (0)