fix: No working dir when zig env

This commit is contained in:
FalsePattern 2024-08-06 18:10:38 +02:00
parent a4facf532e
commit 7089e081e0
Signed by: falsepattern
GPG key ID: E930CDEC50C50E23
2 changed files with 6 additions and 1 deletions

View file

@ -29,6 +29,11 @@ create a custom build configuration as before.
- Increased internal zig tool timeout to 10 seconds. Note that tasks don't have timeout, this is only used for - Increased internal zig tool timeout to 10 seconds. Note that tasks don't have timeout, this is only used for
ZigBrains getting metadata about the compiler and the buildscript. ZigBrains getting metadata about the compiler and the buildscript.
### Fixed
- Project
- Toolchain working directory was not set when requesting compiler metadata
## [16.1.3] ## [16.1.3]
### Changed ### Changed

View file

@ -37,7 +37,7 @@ public class ZigCompilerTool extends AbstractZigTool{
public ZigCompilerTool(AbstractZigToolchain toolchain) { public ZigCompilerTool(AbstractZigToolchain toolchain) {
super(toolchain, TOOL_NAME); super(toolchain, TOOL_NAME);
val app = ApplicationManager.getApplication(); val app = ApplicationManager.getApplication();
val baseFuture = app.executeOnPooledThread(() -> getEnv(null)); val baseFuture = app.executeOnPooledThread(() -> getEnv(toolchain.getLocation()));
version = new Lazy<>(() -> { version = new Lazy<>(() -> {
try { try {
return baseFuture.get().map(ZigToolchainEnvironmentSerializable::version); return baseFuture.get().map(ZigToolchainEnvironmentSerializable::version);