We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8be08b commit 78f64e1Copy full SHA for 78f64e1
src/config.ts
@@ -564,11 +564,8 @@ export function findHomeDir(): string | null {
564
// 2. ...the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that exists and is writeable is returned
565
for (const dir of favourUserProfileList) {
566
try {
567
- const lstat = fs.lstatSync(dir);
568
- // tslint:disable-next-line:no-bitwise
569
- if (lstat && (lstat.mode & fs.constants.S_IXUSR) === fs.constants.S_IXUSR) {
570
- return dir;
571
- }
+ fs.accessSync(dir, fs.constants.W_OK);
+ return dir;
572
// tslint:disable-next-line:no-empty
573
} catch (ignore) {}
574
}
0 commit comments