Limit Run target platforms to plugin declarations
This commit is contained in:
@@ -981,7 +981,7 @@ function quickRuntimeDefaultsForPlugin(pluginId: string) {
|
||||
};
|
||||
}
|
||||
|
||||
function runPlatformOptions(plugin: GamePluginResponse | undefined, fallback: string): string[] {
|
||||
export function runPlatformOptions(plugin: GamePluginResponse | undefined, fallback: string): string[] {
|
||||
const options = new Set<string>();
|
||||
const add = (value: string | undefined) => {
|
||||
const normalized = value?.trim().toLowerCase();
|
||||
@@ -989,10 +989,13 @@ function runPlatformOptions(plugin: GamePluginResponse | undefined, fallback: st
|
||||
options.add(normalized);
|
||||
}
|
||||
};
|
||||
add(fallback);
|
||||
plugin?.supportedOs?.forEach(add);
|
||||
plugin?.runtimeProfiles?.lifecycleProfiles?.forEach((profile) => profile.platforms?.forEach(add));
|
||||
["linux", "windows", "darwin"].forEach(add);
|
||||
if (options.size === 0) {
|
||||
plugin?.runtimeProfiles?.lifecycleProfiles?.forEach((profile) => profile.platforms?.forEach(add));
|
||||
}
|
||||
if (options.size === 0) {
|
||||
add(fallback);
|
||||
}
|
||||
return [...options];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user