fix: Setting workspace via cmd-line not populating compiler path
@@ -74,6 +74,8 @@ public class LoadWorkspace implements Callable<Workspace> {
} catch(Exception ex) {
throw new IllegalArgumentException("Failed to parse workspace config '" + name + "'", ex);
}
+ // Update primary jar in the Recaf tmp folder
+ workspace.writePrimaryJarToTemp();
// Initial load classes & files
if (!lazy) {
status = LangUtil.translate("ui.load.loading");
@@ -101,9 +103,12 @@ public class LoadWorkspace implements Callable<Workspace> {
resource.setClassSources(sources);
if (javadoc != null && javadoc.isFile())
resource.setClassDocs(javadoc);
+ // Create workspace
+ Workspace workspace = new Workspace(resource);
+ workspace.writePrimaryJarToTemp();
status = LangUtil.translate("ui.load.done");
info("Loaded workspace from: {}", input.getName());
- return new Workspace(resource);
+ return workspace;
}
/**
