()
| 1831 | } |
| 1832 | |
| 1833 | export function getAutoUpdaterDisabledReason(): AutoUpdaterDisabledReason | null { |
| 1834 | if (isDevelopmentLikeBuild()) { |
| 1835 | return { type: 'development' } |
| 1836 | } |
| 1837 | if (isEnvTruthy(process.env.DISABLE_AUTOUPDATER)) { |
| 1838 | return { type: 'env', envVar: 'DISABLE_AUTOUPDATER' } |
| 1839 | } |
| 1840 | const essentialTrafficEnvVar = getEssentialTrafficOnlyReason() |
| 1841 | if (essentialTrafficEnvVar) { |
| 1842 | return { type: 'env', envVar: essentialTrafficEnvVar } |
| 1843 | } |
| 1844 | const config = getGlobalConfig() |
| 1845 | if ( |
| 1846 | config.autoUpdates === false && |
| 1847 | (config.installMethod !== 'native' || |
| 1848 | config.autoUpdatesProtectedForNative !== true) |
| 1849 | ) { |
| 1850 | return { type: 'config' } |
| 1851 | } |
| 1852 | return null |
| 1853 | } |
| 1854 | |
| 1855 | export function getOrCreateUserID(): string { |
| 1856 | const config = getGlobalConfig() |
no test coverage detected