function getFlagOs()

in src/commands/createWebApp/stacks/getStackPicks.ts [78:89]


function getFlagOs(ss: WebAppRuntimes & JavaContainers, key: 'isPreview' | 'isEarlyAccess'): FlagOS {
    if ([ss.linuxContainerSettings, ss.windowsContainerSettings, ss.linuxRuntimeSettings, ss.windowsRuntimeSettings].every(s => !s || s[key])) {
        // NOTE: 'All' means all OS's _that are defined_ have the flag set. This may only be one OS if that's all that is defined/supported by this stack
        return 'All';
    } else if (ss.linuxRuntimeSettings?.[key] || ss.linuxContainerSettings?.[key]) {
        return 'Linux';
    } else if (ss.windowsRuntimeSettings?.[key] || ss.windowsContainerSettings?.[key]) {
        return 'Windows';
    } else {
        return 'None';
    }
}