in src/Cli/func/Helpers/GlobalCoreToolsSettings.cs [46:102]
public static void Init(ISecretsManager secretsManager, string[] args)
{
try
{
if (args.Contains("--csharp"))
{
_currentWorkerRuntime = WorkerRuntime.Dotnet;
CurrentLanguageOrNull = "csharp";
}
else if (args.Contains("--dotnet"))
{
_currentWorkerRuntime = WorkerRuntime.Dotnet;
}
else if (args.Contains("--dotnet-isolated"))
{
_currentWorkerRuntime = WorkerRuntime.DotnetIsolated;
}
else if (args.Contains("--javascript"))
{
_currentWorkerRuntime = WorkerRuntime.Node;
CurrentLanguageOrNull = "javascript";
}
else if (args.Contains("--typescript"))
{
_currentWorkerRuntime = WorkerRuntime.Node;
CurrentLanguageOrNull = "typescript";
}
else if (args.Contains("--node"))
{
_currentWorkerRuntime = WorkerRuntime.Node;
}
else if (args.Contains("--java"))
{
_currentWorkerRuntime = WorkerRuntime.Java;
}
else if (args.Contains("--python"))
{
_currentWorkerRuntime = WorkerRuntime.Python;
}
else if (args.Contains("--powershell"))
{
_currentWorkerRuntime = WorkerRuntime.Powershell;
}
else if (args.Contains("--custom"))
{
_currentWorkerRuntime = WorkerRuntime.Custom;
}
else
{
_currentWorkerRuntime = WorkerRuntimeLanguageHelper.GetCurrentWorkerRuntimeLanguage(secretsManager);
}
}
catch
{
_currentWorkerRuntime = WorkerRuntime.None;
}
}