We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69e5524 commit d3d9bceCopy full SHA for d3d9bce
src/Utilities.ts
@@ -34,13 +34,19 @@ export default class Utilities {
34
return null;
35
}
36
37
- try {
38
- var homePath = path.join(process.env.HOME || '', defaultPath);
39
- fs.accessSync(homePath);
40
- return homePath;
41
- } catch (e) {
42
- return null;
+ var darwinPaths = [
+ path.join(process.env.HOME || '', defaultPath),
+ defaultPath,
+ ];
+
+ for (let i = 0; i < darwinPaths.length; i++) {
43
+ try {
44
+ fs.accessSync(darwinPaths[i]);
45
+ return darwinPaths[i];
46
+ } catch {}
47
48
49
+ return null;
50
51
52
// Return location of Edge.exe file for a given directory.
0 commit comments