@goosyai/goosy 1.0.5 → 1.0.6
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/goosy-darwin-amd64
CHANGED
|
Binary file
|
package/bin/goosy-darwin-arm64
CHANGED
|
Binary file
|
package/bin/goosy-linux-amd64
CHANGED
|
Binary file
|
package/bin/goosy-linux-arm64
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/goosy.js
CHANGED
|
@@ -20,12 +20,24 @@ if (!existsSync(binary)) {
|
|
|
20
20
|
process.exit(1);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
let chmodFailed = false;
|
|
23
24
|
if (platform !== "windows") {
|
|
24
|
-
|
|
25
|
+
// Self-heals a binary that lost its executable bit (e.g. some tar
|
|
26
|
+
// extractions). This throws EPERM instead when the file is owned by
|
|
27
|
+
// another user — typically because the package was installed with sudo —
|
|
28
|
+
// which the catch below turns into an actionable message rather than a
|
|
29
|
+
// bare downstream EACCES.
|
|
30
|
+
try { chmodSync(binary, 0o755); } catch (_) { chmodFailed = true; }
|
|
25
31
|
}
|
|
26
32
|
|
|
27
33
|
const child = spawn(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
28
34
|
child.on("error", (err) => {
|
|
35
|
+
if (err.code === "EACCES" && chmodFailed) {
|
|
36
|
+
console.error(`Goosy's binary isn't executable and couldn't fix itself: ${binary}`);
|
|
37
|
+
console.error("This usually means it was installed with sudo, so it's owned by root and your user can't grant itself execute permission.");
|
|
38
|
+
console.error(`Fix with either:\n sudo chmod +x "${binary}"\nor reinstall without sudo:\n npm uninstall -g @goosyai/goosy && npm install -g @goosyai/goosy`);
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
29
41
|
console.error(`Unable to start Goosy: ${err.message}`);
|
|
30
42
|
process.exit(1);
|
|
31
43
|
});
|