• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

devonfw / IDEasy / 19790759973

29 Nov 2025 11:27PM UTC coverage: 69.41% (-0.02%) from 69.431%
19790759973

push

github

web-flow
#1616: fixed postInstall problems (#1619)

3697 of 5857 branches covered (63.12%)

Branch coverage included in aggregate %.

9620 of 13329 relevant lines covered (72.17%)

3.14 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

76.92
cli/src/main/java/com/devonfw/tools/ide/tool/node/Node.java
1
package com.devonfw.tools.ide.tool.node;
2

3
import java.util.Set;
4

5
import com.devonfw.tools.ide.common.Tag;
6
import com.devonfw.tools.ide.context.IdeContext;
7
import com.devonfw.tools.ide.nls.NlsBundle;
8
import com.devonfw.tools.ide.process.ProcessResult;
9
import com.devonfw.tools.ide.tool.LocalToolCommandlet;
10
import com.devonfw.tools.ide.tool.ToolCommandlet;
11
import com.devonfw.tools.ide.tool.ToolInstallRequest;
12
import com.devonfw.tools.ide.tool.npm.Npm;
13

14
/**
15
 * {@link ToolCommandlet} for <a href="https://nodejs.org/">node</a>.
16
 */
17
public class Node extends LocalToolCommandlet {
18

19
  /**
20
   * The constructor.
21
   *
22
   * @param context the {@link IdeContext}.
23
   */
24
  public Node(IdeContext context) {
25

26
    super(context, "node", Set.of(Tag.JAVA_SCRIPT, Tag.RUNTIME));
7✔
27
  }
1✔
28

29
  @Override
30
  protected void postInstallOnNewInstallation(ToolInstallRequest request) {
31

32
    super.postInstallOnNewInstallation(request);
3✔
33
    Npm npm = this.context.getCommandletManager().getCommandlet(Npm.class);
7✔
34
    ProcessResult result = npm.runPackageManager("config", "set", "prefix", getToolPath().toString());
23✔
35
    if (result.isSuccessful()) {
3!
36
      this.context.success("Setting npm config prefix to: {} was successful", getToolPath());
11✔
37
    }
38
  }
1✔
39

40
  @Override
41
  public void printHelp(NlsBundle bundle) {
42

43
    this.context.info("For a list of supported options and arguments, use \"node --help\"");
×
44
  }
×
45

46
  @Override
47
  protected boolean isIgnoreSoftwareRepo() {
48

49
    return true;
2✔
50
  }
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc