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

devonfw / IDEasy / 28444220737

30 Jun 2026 12:27PM UTC coverage: 71.386% (+0.03%) from 71.359%
28444220737

Pull #2087

github

web-flow
Merge 03b74e4b5 into 0709e0a80
Pull Request #2087: #2068: Isolate Claude Code configuration per IDEasy project

4711 of 7298 branches covered (64.55%)

Branch coverage included in aggregate %.

12139 of 16306 relevant lines covered (74.44%)

3.16 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/process/EnvironmentContext.java
1
package com.devonfw.tools.ide.process;
2

3
import java.nio.file.Path;
4

5
/**
6
 * Interface for the environment context relatable in the case a tool needs to be run with an environment variable.
7
 */
8
public interface EnvironmentContext {
9

10
  /**
11
   * Sets or overrides the specified environment variable only in this context. Please note that the environment variables are initialized when the
12
   * {@link EnvironmentContext} is created. This method explicitly set an additional or overrides an existing environment and will have effect only within this
13
   * context and not change the {@link com.devonfw.tools.ide.environment.EnvironmentVariables} or {@link com.devonfw.tools.ide.common.SystemPath}.
14
   *
15
   * @param key the name of the environment variable (E.g. "PATH").
16
   * @param value the value of the environment variable.
17
   * @return this {@link EnvironmentContext} for fluent API calls.
18
   */
19
  EnvironmentContext withEnvVar(String key, String value);
20

21
  /**
22
   * Extends the "PATH" variable with the given {@link Path} entry. The new entry will be added to the beginning of the "PATH" and potentially override other
23
   * entries if it contains the same binary.
24
   *
25
   * @param path the {@link Path} pointing to the folder with the binaries to add to the "PATH" variable.
26
   * @return this {@link EnvironmentContext} for fluent API calls.
27
   */
28
  EnvironmentContext withPathEntry(Path path);
29

30
  /**
31
   * Removes (unsets) the specified environment variable in this context so that an inherited/ambient value cannot leak into the launched process. The default
32
   * implementation is a no-op; only contexts backed by a real process environment (see {@link com.devonfw.tools.ide.process.ProcessContextImpl}) actually
33
   * remove the variable. Collector contexts used for shell export intentionally ignore this so the user's interactive shell is never modified.
34
   *
35
   * @param key the name of the environment variable to remove.
36
   * @return this {@link EnvironmentContext} for fluent API calls.
37
   */
38
  default EnvironmentContext removeEnvVar(String key) {
39
    return this;
×
40
  }
41

42
  /**
43
   * @return an empty instance of {@link EnvironmentContext} to prevent {@link NullPointerException}s.
44
   */
45
  static EnvironmentContext getEmpty() {
46

47
    return EnvironmentContextEmpty.INSTANCE;
×
48
  }
49

50
}
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