Fix safeStorage use in CI

This commit is contained in:
Fedor Indutny
2026-02-05 10:13:16 -08:00
committed by GitHub
parent 59762be55d
commit c5ba980fdd

View File

@@ -1662,6 +1662,11 @@ function getSQLKey(): string {
? safeStorage.getSelectedStorageBackend() ? safeStorage.getSelectedStorageBackend()
: undefined; : undefined;
const isEncryptionAvailable = const isEncryptionAvailable =
// Don't use safeStorage if not packaged and building preload cache or
// running test-electron to avoid blocking prompt on macOS CI.
(app.isPackaged ||
(!process.env.GENERATE_PRELOAD_CACHE &&
!isTestEnvironment(getEnvironment()))) &&
safeStorage.isEncryptionAvailable() && safeStorage.isEncryptionAvailable() &&
(!isLinux || safeStorageBackend !== 'basic_text'); (!isLinux || safeStorageBackend !== 'basic_text');