mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-26 08:51:22 -06:00
SDA-4242: Local will take prio if invalid value inserted into HKCU (#1906)
This commit is contained in:
parent
695db74438
commit
bd48b69345
@ -1,5 +1,5 @@
|
||||
import { logger } from '../common/logger';
|
||||
import { RegistryStore } from './stores/registry-store';
|
||||
import { EChannelRegistry, RegistryStore } from './stores/registry-store';
|
||||
|
||||
enum RegistryValueType {
|
||||
REG_SZ = 'REG_SZ',
|
||||
@ -44,7 +44,12 @@ export const retrieveWindowsRegistry = async (): Promise<string> => {
|
||||
|
||||
return new Promise((resolve) => {
|
||||
regKeyUser.get(CHANNEL_KEY, (error, channel) => {
|
||||
if (error || !channel) {
|
||||
if (
|
||||
error ||
|
||||
![EChannelRegistry.BETA, EChannelRegistry.LATEST].includes(
|
||||
channel?.value,
|
||||
)
|
||||
) {
|
||||
logger.error('registry-handler: error occurred. Details: ', error);
|
||||
|
||||
regKeyLocal.get(CHANNEL_KEY, (err, localChannel) => {
|
||||
|
Loading…
Reference in New Issue
Block a user