ce7cb702218693d08ea6d83464d2457c9250027c
This commit is contained in:
commit
34c5f8963c
1 changed files with 145336 additions and 0 deletions
25
packages/fsharp-runner/hostexec/Program.cs
Normal file
25
packages/fsharp-runner/hostexec/Program.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
using Quorate.HostExec;
|
||||
|
||||
internal static class Program
|
||||
{
|
||||
[SuppressMessage("Design", "CA1031", Justification = "The executable boundary maps failures to the proxy exit code.")]
|
||||
private static async Task<int> Main(string[] args)
|
||||
{
|
||||
if (args.Length == 0)
|
||||
{
|
||||
await Console.Error.WriteLineAsync("proxy path is missing").ConfigureAwait(false);
|
||||
return 125;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
return await Proxy.Run(args[0], args[1..]).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception error)
|
||||
{
|
||||
await Console.Error.WriteLineAsync($"{error.GetType().Name}: {error.Message}").ConfigureAwait(false);
|
||||
return 125;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue