@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.
Binary file
Binary file
Binary file
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
- try { chmodSync(binary, 0o755); } catch (_) { /* package files may be read-only */ }
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
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goosyai/goosy",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "AI-powered security scanning and patching CLI",
5
5
  "bin": {
6
6
  "goosy": "bin/goosy.js"