Use guard clauses to reduce indentation.

This way, the 8.2.0-Dev version of `PlatformSetup` will have the same indentation as the version on the develop branch. Without matching indentation, Git actively hinders the merging process.
This commit is contained in:
Joseph Cloutier
2024-04-13 03:07:27 -04:00
parent 58bedb124e
commit fc90d2cd21

View File

@@ -816,8 +816,16 @@ class PlatformSetup
setupHaxelib(new Haxelib("lime"));
}
if (System.hostPlatform == MAC)
{
ConfigHelper.writeConfigValue("MAC_USE_CURRENT_SDK", "1");
}
if (!targetFlags.exists("noalias"))
{
return;
}
var haxePath = Sys.getEnv("HAXEPATH");
if (System.hostPlatform == WINDOWS)
@@ -905,12 +913,6 @@ class PlatformSetup
}
}
if (System.hostPlatform == MAC)
{
ConfigHelper.writeConfigValue("MAC_USE_CURRENT_SDK", "1");
}
}
public static function setupLinux():Void
{
var whichAptGet = System.runProcess("", "which", ["apt-get"], true, true, true);
@@ -1039,8 +1041,16 @@ class PlatformSetup
setupHaxelib(new Haxelib("openfl"));
}
if (!targetFlags.exists("noalias"))
if (System.hostPlatform == MAC)
{
ConfigHelper.writeConfigValue("MAC_USE_CURRENT_SDK", "1");
}
if (targetFlags.exists("noalias"))
{
return;
}
var haxePath = Sys.getEnv("HAXEPATH");
var project = null;
@@ -1157,12 +1167,6 @@ class PlatformSetup
}
}
if (System.hostPlatform == MAC)
{
ConfigHelper.writeConfigValue("MAC_USE_CURRENT_SDK", "1");
}
}
public static function setupWebAssembly():Void
{
Log.println("\x1b[1mIn order to build for WebAssembly or asm.js, you must download");