From 104d19eb395802b711f023e93df874a7c3986274 Mon Sep 17 00:00:00 2001 From: Vitali Semianiaka Date: Wed, 31 Dec 2025 18:12:18 +0300 Subject: [PATCH] default --- Program.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Program.cs b/Program.cs index 90771f4..3f1ff07 100644 --- a/Program.cs +++ b/Program.cs @@ -1,9 +1,17 @@ -using System.Text.Json; +using System.Reflection; +using System.Text.Json; using s8n_runtime.ViewModels; string workflowViewFile = Environment.GetEnvironmentVariable("WORKFLOW_FILE")!; string projectDirectory = Environment.GetEnvironmentVariable("PROJECT_DIR") ?? $"/sources"; +if (string.IsNullOrEmpty(workflowViewFile) || !Directory.Exists(projectDirectory)) +{ + AssemblyName a_name = Assembly.GetExecutingAssembly()!.GetName(); + Console.WriteLine("S8N Compiler, version: {0}.\nSpecify environment variables: WORKFLOW_FILE, PROJECT_DIR.\nCLR: {1}", a_name.Version, Environment.Version); + return; +} + var workflow = JsonSerializer.Deserialize(File.OpenRead(workflowViewFile), JsonSerializerOptions.Web)!; var edgesFile = Path.Combine("/sources", $"{workflow.Name}.Edges.cs");