Skip to content

Commit

Permalink
#24 in develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Vanusanik committed Jan 20, 2023
1 parent 5c1229c commit 90e5222
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ public boolean isActive() {
public void start(SltLispEnvironmentConfiguration configuration) throws SltProcessException {
if (process != null)
return;
if (!(configuration instanceof SltLispEnvironmentProcessConfiguration))
if (!(configuration instanceof SltLispEnvironmentProcessConfiguration processConfiguration))
throw new SltProcessException("Configuration incorrect");
SltLispEnvironmentProcessConfiguration processConfiguration = (SltLispEnvironmentProcessConfiguration)
configuration;

try {
Object environment = prepareProcessEnvironment(processConfiguration);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.en_circle.slt.templates.SltScriptTemplate;
import com.intellij.openapi.util.io.FileUtil;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.watertemplate.Template;

import java.io.File;
Expand All @@ -31,7 +32,11 @@ protected Object prepareProcessEnvironment(SltLispEnvironmentProcessConfiguratio

e.serverStartSetup = new File(tempDir, "startServer.cl");
e.serverStartSetup.deleteOnExit();
String startScriptTemplate = new SBCLInitScriptTemplate(c, e.sltCore.getAbsolutePath()).render();
String sltCorePath = e.sltCore.getAbsolutePath();
if (sltCorePath.contains("//")) {
sltCorePath = StringUtils.replace(sltCorePath, "\\", "\\\\");
}
String startScriptTemplate = new SBCLInitScriptTemplate(c, sltCorePath).render();
FileUtils.write(e.serverStartSetup, startScriptTemplate, StandardCharsets.UTF_8);

tempDir.deleteOnExit();
Expand Down

0 comments on commit 90e5222

Please sign in to comment.