feat: descriptive error in case `-activeBuildProfile` is passed without actual value

pull/738/head
Ryoichiro Oka 2025-09-30 01:03:46 +09:00
parent a35da6ee30
commit 9262ee449c
1 changed files with 4 additions and 1 deletions

View File

@ -56,7 +56,10 @@ namespace UnityBuilderAction
// of either `UnityEditor.BuildPlayerOptions` or `UnityEditor.BuildPlayerWithProfileOptions` // of either `UnityEditor.BuildPlayerOptions` or `UnityEditor.BuildPlayerWithProfileOptions`
dynamic buildPlayerOptions; dynamic buildPlayerOptions;
if (options.TryGetValue("activeBuildProfile", out var buildProfilePath) && !string.IsNullOrEmpty(buildProfilePath)) { if (options.TryGetValue("activeBuildProfile", out var buildProfilePath)) {
if (string.IsNullOrEmpty(buildProfilePath)) {
throw new Exception("`-activeBuildProfile` is set but with an empty value; this shouldn't happen");
}
#if UNITY_6000_0_OR_NEWER #if UNITY_6000_0_OR_NEWER
// Load build profile from Assets folder // Load build profile from Assets folder