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

devonfw / IDEasy / 9904178931

12 Jul 2024 07:32AM UTC coverage: 61.387% (-0.5%) from 61.842%
9904178931

push

github

web-flow
#400: fix error handling for undefined IDE_ROOT and IDE_HOME (#476)

1997 of 3575 branches covered (55.86%)

Branch coverage included in aggregate %.

5297 of 8307 relevant lines covered (63.77%)

2.8 hits per line

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

50.0
cli/src/main/java/com/devonfw/tools/ide/commandlet/VersionCommandlet.java
1
package com.devonfw.tools.ide.commandlet;
2

3
import com.devonfw.tools.ide.context.IdeContext;
4
import com.devonfw.tools.ide.property.FlagProperty;
5
import com.devonfw.tools.ide.version.IdeVersion;
6

7
/**
8
 * Prints the IDEasy version and exits
9
 */
10
public class VersionCommandlet extends Commandlet {
11

12
  /**
13
   * The constructor.
14
   *
15
   * @param context the {@link IdeContext}.
16
   */
17
  public VersionCommandlet(IdeContext context) {
18

19
    super(context);
3✔
20
    addKeyword(new FlagProperty(getName(), true, "-v"));
9✔
21
  }
1✔
22

23
  @Override
24
  public String getName() {
25

26
    return "--version";
2✔
27
  }
28

29
  @Override
30
  public boolean isIdeRootRequired() {
31

32
    return false;
×
33
  }
34

35
  @Override
36
  public boolean isProcessableOutput() {
37

38
    return true;
×
39
  }
40

41
  @Override
42
  public void run() {
43

44
    this.context.info(IdeVersion.get());
×
45
  }
×
46
}
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

© 2025 Coveralls, Inc