Skip to content

Commit 258129a

Browse files
committed
CLI: Fix option validation to check for valid Emscripten platform.
1 parent 83f2c4d commit 258129a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/CLI/Generator.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ public bool ValidateOptions(List<string> messages)
9090

9191
options.Platform ??= Platform.Host;
9292

93+
if (options.Architecture is TargetArchitecture.WASM32 or TargetArchitecture.WASM64 &&
94+
options.Platform is not TargetPlatform.Emscripten)
95+
{
96+
messages.Add("Please set Emscripten platform for WASM architectures.");
97+
return false;
98+
}
99+
93100
if (string.IsNullOrEmpty(options.OutputDir))
94101
{
95102
options.OutputDir = Path.Combine(Directory.GetCurrentDirectory(), "gen");

0 commit comments

Comments
 (0)