foxguard 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/foxguard +6 -1
- package/package.json +1 -1
package/bin/foxguard
CHANGED
|
@@ -65,7 +65,12 @@ function findCargoInstall() {
|
|
|
65
65
|
encoding: "utf8",
|
|
66
66
|
}).trim();
|
|
67
67
|
if (result && !result.includes("node_modules")) {
|
|
68
|
-
|
|
68
|
+
// Resolve symlinks to avoid finding ourselves (the npm wrapper)
|
|
69
|
+
const resolved = fs.realpathSync(result);
|
|
70
|
+
const thisScript = fs.realpathSync(__filename);
|
|
71
|
+
if (resolved !== thisScript) {
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
69
74
|
}
|
|
70
75
|
} catch {}
|
|
71
76
|
|