
Security News
vlt Launches Real-Time Dependency Analysis Powered by Socket
vlt adds real-time security selectors powered by Socket, enabling developers to query and analyze package risks directly in their dependency graph.
com.github.brymck:with-environment
Advanced tools
Execute a block with overridden environment variables
with-environment
is a library that allows overriding the system environment and executing a block.
Much of this is shamelessly yanked from SystemRules and is just designed to decouple the functionality from JUnit 4 and provide a natural Kotlin interface.
Include this in your POM:
<dependency>
<groupId>com.github.brymck</groupId>
<artifactId>with-environment</artifactId>
<version>0.9.1</version>
</dependency>
And use it as so in Java:
Map<String, String> overrides = new HashMap();
overrides.put("FOO", "bar");
WithEnvironment.withEnvironmentOverrides(overrides, () -> {
String foo = System.getenv("FOO");
System.out.println(foo); // prints "bar"
});
or Kotlin:
val overrides = mapOf("FOO" to "bar")
withEnvironmentOverrides(overrides) {
val foo = System.getenv("FOO");
println(foo) // prints "bar"
}
FAQs
Execute a block with overridden environment variables
We found that com.github.brymck:with-environment demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt adds real-time security selectors powered by Socket, enabling developers to query and analyze package risks directly in their dependency graph.
Security News
CISA extended MITRE’s CVE contract by 11 months, avoiding a shutdown but leaving long-term governance and coordination issues unresolved.
Product
Socket's Rubygems ecosystem support is moving from beta to GA, featuring enhanced security scanning to detect supply chain threats beyond traditional CVEs in your Ruby dependencies.