@codacy/gate-cli 0.4.0 → 0.4.1

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.
Files changed (2) hide show
  1. package/bin/gate.js +16 -3
  2. package/package.json +1 -1
package/bin/gate.js CHANGED
@@ -12171,11 +12171,24 @@ function registerInitCommand(program2) {
12171
12171
  printWarn(" Claude Code not found \u2014 hooks will be configured but need Claude Code to run.");
12172
12172
  }
12173
12173
  try {
12174
- (0, import_node_child_process6.execSync)("which codacy-analysis", { encoding: "utf-8" });
12174
+ (0, import_node_child_process6.execSync)("which codacy-analysis", { encoding: "utf-8", stdio: "pipe" });
12175
12175
  printInfo(" @codacy/analysis-cli \u2713");
12176
12176
  } catch {
12177
- printWarn(" @codacy/analysis-cli not found \u2014 static analysis will be unavailable.");
12178
- printWarn(" Install: npm install -g @codacy/analysis-cli");
12177
+ printInfo(" Installing @codacy/analysis-cli...");
12178
+ try {
12179
+ (0, import_node_child_process6.execSync)("npm install -g @codacy/analysis-cli", { encoding: "utf-8", stdio: "pipe", timeout: 12e4 });
12180
+ printInfo(" @codacy/analysis-cli installed \u2713");
12181
+ } catch {
12182
+ try {
12183
+ printWarn(" Retrying with sudo...");
12184
+ (0, import_node_child_process6.execSync)("sudo npm install -g @codacy/analysis-cli", { encoding: "utf-8", stdio: "inherit", timeout: 12e4 });
12185
+ printInfo(" @codacy/analysis-cli installed \u2713");
12186
+ } catch {
12187
+ printWarn(" Could not install @codacy/analysis-cli automatically.");
12188
+ printWarn(" Install manually: npm install -g @codacy/analysis-cli");
12189
+ printWarn(" Static analysis will be unavailable until installed.");
12190
+ }
12191
+ }
12179
12192
  }
12180
12193
  console.log("");
12181
12194
  printInfo("Installing skills...");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/gate-cli",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "CLI for GATE.md quality gate service",
5
5
  "bin": {
6
6
  "gate": "./bin/gate.js"