Skip to content

Commit

Permalink
Do not add -i argument when unfederated
Browse files Browse the repository at this point in the history
  • Loading branch information
lhstrh committed Jun 14, 2024
1 parent c8cb503 commit 73d6915
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.List;
import org.lflang.LocalStrings;
import org.lflang.generator.LFGeneratorContext;
import org.lflang.generator.SubContext;
import org.lflang.generator.c.CCompiler;
import org.lflang.target.Target;

Expand Down Expand Up @@ -56,7 +57,11 @@ protected String generateDockerFileContent() {

@Override
public List<String> defaultEntryPoint() {
return List.of("./bin/" + context.getFileConfig().name, "-i", "1");
if (context instanceof SubContext) {
return List.of("./bin/" + context.getFileConfig().name, "-i", "1");
} else {
return List.of("./bin/" + context.getFileConfig().name);
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ protected String generateDockerNetwork(String networkName) {
*/
protected String generateDockerServices(List<DockerData> services) {
return """
version: "3.9"
services:
%s
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.util.List;
import org.lflang.generator.LFGeneratorContext;
import org.lflang.generator.SubContext;

/**
* Generates the docker file related code for the Typescript target.
Expand Down Expand Up @@ -29,7 +30,11 @@ public String generateDockerFileContent() {

@Override
public List<String> defaultEntryPoint() {
return List.of("node", "dist/%s.js".formatted(context.getFileConfig().name), "-i", "1");
if (context instanceof SubContext) {
return List.of("node", "dist/%s.js".formatted(context.getFileConfig().name), "-i", "1");
} else {
return List.of("node", "dist/%s.js".formatted(context.getFileConfig().name));
}
}

@Override
Expand Down

0 comments on commit 73d6915

Please sign in to comment.