mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 04:28:41 -09:00
Improve detection of selected editor on Windows (#3242)
Improves upon previous work completed in #2631: - Add additional system default check: `JSFile` - Relax restriction on `.exe` file extension as it is an invalid assumption: Closes #3223
This commit is contained in:
parent
23c4945a12
commit
cd742fbdaa
1 changed files with 4 additions and 4 deletions
|
|
@ -25,8 +25,8 @@ if (process.platform === 'win32') {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Find UserChoice key
|
// Find UserChoice key
|
||||||
const userChoice = keys.filter(k => k.key.endsWith('UserChoice'));
|
const userChoice = keys.find(k => k.key.endsWith('UserChoice'));
|
||||||
return userChoice[0];
|
return userChoice;
|
||||||
};
|
};
|
||||||
|
|
||||||
const hasDefaultSet = async () => {
|
const hasDefaultSet = async () => {
|
||||||
|
|
@ -44,8 +44,8 @@ if (process.platform === 'win32') {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Look for default program
|
// Look for default program
|
||||||
const hasDefaultProgramConfigured = values.some(
|
const hasDefaultProgramConfigured = values.every(
|
||||||
value => value && typeof value === 'string' && value.endsWith('.exe') && !value.includes('WScript.exe')
|
value => value && typeof value === 'string' && !value.includes('WScript.exe') && !value.includes('JSFile')
|
||||||
);
|
);
|
||||||
|
|
||||||
return hasDefaultProgramConfigured;
|
return hasDefaultProgramConfigured;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue