From b0cbc2ebef489e316855d4f4e477011dc815b4db Mon Sep 17 00:00:00 2001 From: Andrii Kurdiumov Date: Tue, 17 Oct 2023 20:47:42 +0600 Subject: [PATCH] Make build and run CLI switch build too This does not solve issue with producing OtterkitExport.csproj in .otterkit/Artifacts folder, but this is closer to what I can do without even thinking about proper way to fix CLI --- src/Otterkit.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Otterkit.cs b/src/Otterkit.cs index 0898a93c..3b10ce88 100644 --- a/src/Otterkit.cs +++ b/src/Otterkit.cs @@ -222,6 +222,7 @@ private static void OtterkitMain() if (CompilerOptions.Mode is BuildType.BuildOnly) { + Directory.CreateDirectory(".otterkit/Artifacts"); CodeGenerator.Generate(CompilerContext.SourceTokens, CompilerOptions.Main); Directory.CreateDirectory(".otterkit/Build"); @@ -230,8 +231,10 @@ private static void OtterkitMain() if (CompilerOptions.Mode is BuildType.BuildAndRun) { + Directory.CreateDirectory(".otterkit/Artifacts"); CodeGenerator.Generate(CompilerContext.SourceTokens, CompilerOptions.Main); + CallDotnetCompiler("build"); Directory.CreateDirectory(".otterkit/Build"); CallDotnetCompiler("run"); }