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

devonfw / IDEasy / 28357981105

29 Jun 2026 08:11AM UTC coverage: 70.246% (-1.1%) from 71.356%
28357981105

Pull #2083

github

web-flow
Merge e4117a094 into a98452817
Pull Request #2083: #2007: Support Docker on Arch Linux with pacman and yay

3711 of 5956 branches covered (62.31%)

Branch coverage included in aggregate %.

10256 of 13927 relevant lines covered (73.64%)

3.68 hits per line

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

0.0
cli/src/main/java/com/devonfw/tools/ide/tool/NativePackageManager.java
1
package com.devonfw.tools.ide.tool;
2

3
/**
4
 * Represents an OS native package manager used for managing software packages.
5
 */
6
public enum NativePackageManager {
×
7
  /** Advanced Package Tool (APT) is the package manager of Debian based Linux distributions. */
8
  APT,
×
9

10
  /** Zypper is the package manager of SUSE based Linux distributions. */
11
  ZYPPER,
×
12

13
  /** Yellowdog Updater Modified (YUM) is the package manager of RPM package based Linux distributions like Fedora, Red Hat, or CentOS. */
14
  YUM,
×
15

16
  /** DaNdiFied yum (DNF) is the package manager of RPM package based Linux distributions like Fedora. It is the successor of {@link #YUM}. */
17
  DNF,
×
18

19
  /** Pacman is the package manager of Arch Linux based distributions. */
20
  PACMAN;
×
21

22
  /**
23
   * Extracts the package manager from the provided command string.
24
   *
25
   * @param command The command string to extract the package manager from.
26
   * @return The corresponding {@code PackageManager} based on the provided command string.
27
   * @throws IllegalArgumentException If the command string does not contain a recognized package manager.
28
   */
29
  public static NativePackageManager extractPackageManager(String command) {
30

31
    if (command.contains("apt")) {
×
32
      return APT;
×
33
    }
34
    if (command.contains("yum")) {
×
35
      return YUM;
×
36
    }
37
    if (command.contains("zypper")) {
×
38
      return ZYPPER;
×
39
    }
40
    if (command.contains("dnf")) {
×
41
      return DNF;
×
42
    }
43
    if (command.contains("pacman")) {
×
44
      return PACMAN;
×
45
    }
46

47
    throw new IllegalArgumentException("Unknown package manager in command: " + command);
×
48
  }
49

50
  public String getBinaryName() {
51

52
    return name().toLowerCase();
×
53
  }
54
}
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