Skip to content

Commit fca4828

Browse files
Earlier exit
1 parent c7ca9b1 commit fca4828

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/main/java/com/google/devtools/build/lib/analysis/platform/PlatformUtils.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ public static Platform getPlatformProto(
7676
? remoteOptions.getRemoteDefaultExecProperties()
7777
: ImmutableSortedMap.of();
7878

79-
// TODO Rewrite `spawn.getExecutionPlatform() == null`, should always be set
80-
if (spawn.getExecutionPlatform() == null
79+
if ((spawn.getExecutionPlatform() == null || spawn.getExecutionPlatform().execProperties().isEmpty())
8180
&& spawn.getCombinedExecProperties().isEmpty()
8281
&& defaultExecProperties.isEmpty()
8382
&& additionalProperties.isEmpty()) {
@@ -134,10 +133,6 @@ public static Platform getPlatformProto(
134133
}
135134
}
136135

137-
if (properties.size() == 0) {
138-
return null;
139-
}
140-
141136
Platform.Builder platformBuilder = Platform.newBuilder();
142137
for (Map.Entry<String, String> entry : properties.entrySet()) {
143138
platformBuilder.addPropertiesBuilder().setName(entry.getKey()).setValue(entry.getValue());

0 commit comments

Comments
 (0)