diff --git a/dist/index.js b/dist/index.js index dc83d3c2..ea151c67 100644 Binary files a/dist/index.js and b/dist/index.js differ diff --git a/dist/index.js.map b/dist/index.js.map index 17e0236a..c8ffcd06 100644 Binary files a/dist/index.js.map and b/dist/index.js.map differ diff --git a/src/model/platform-validation/validate-windows.ts b/src/model/platform-validation/validate-windows.ts index dda81d58..2a7b68df 100644 --- a/src/model/platform-validation/validate-windows.ts +++ b/src/model/platform-validation/validate-windows.ts @@ -4,7 +4,12 @@ import { BuildParameters } from '..'; class ValidateWindows { public static validate(buildParameters: BuildParameters) { ValidateWindows.validateWindowsPlatformRequirements(buildParameters.targetPlatform); - if (!((process.env.UNITY_EMAIL && process.env.UNITY_PASSWORD) || buildParameters.unityLicensingServer)) { + + const { unityLicensingServer } = buildParameters; + const hasLicensingCredentials = process.env.UNITY_EMAIL && process.env.UNITY_PASSWORD; + const hasValidLicensingStrategy = hasLicensingCredentials || unityLicensingServer; + + if (!hasValidLicensingStrategy) { throw new Error(`Unity email and password or alternatively a Unity licensing server url must be set for Windows based builds to authenticate the license. Make sure to set them inside UNITY_EMAIL and UNITY_PASSWORD in Github Secrets and pass them into the environment.`);