fix(build): #1002 args manage ports fix#1120
Conversation
|
|
|
I just realized this is not a valid change 😢, here is why: Both
makes/makes/tests/makeTemplate/main.nix Lines 11 to 19 in 91ee9fe This basically means that we cannot source After running some tests on this change I realized that the resulting templated script still cannot find the Makes' {makeTemplate, ...}:
makeTemplate {
replace = {
__argTest__ = "This is a test";
};
name = "test-make-template-2";
template = "error __argTest__";
}The resulting template file was simply error This is a testWhen executing this with a shell interpreter like bash, It could not find $ bash /nix/store/b2dk4p5gyarrgwd5gqd91vygi1dbnbxg-make-template-for-test-make-template-2/template
/nix/store/b2dk4p5gyarrgwd5gqd91vygi1dbnbxg-make-template-for-test-make-template-2/template: line 1: error: command not foundThe only feasible solution I see here if we want to keep the adding makes/src/args/manage-ports/default.nix Lines 6 to 15 in 91ee9fe and sourcing it here, right before declaring the functions: makes/src/args/manage-ports/template.sh Lines 1 to 3 in 91ee9fe |
|
BTW, let's keep this PR open for easier traceability, you can simply amend your commit and push again, that will update the PR. |
|
Hello @dsalaza4, I made a few changes following your recommendations. I'm passing I tried to test this by modifying the files in
I'm just showing the end of the backtrace. It says that it cannot find my Here's how I modified the {
fromYaml,
makeTemplate,
__shellCommands__,
...
}: let
testFile = fromYaml (
builtins.readFile ./test.yaml
);
testString = testFile.testTitle;
in
makeTemplate {
replace = {
__argShellCommands__ = __shellCommands__;
};
name = "my-template";
template = ./my-template.sh;
}And this is the new source __argShellCommands__
error "Hello"Could you help me understanding why this happens? I'm looking forward to your comments. Thank you! |
I think this is because you did not |
I just ran the same test and it worked well for me! |
|
Please add missing mailmap entry for noreply https://github.com/fluidattacks/makes/actions/runs/5537342039/jobs/10106243030?pr=1120 |
- sourcing `shellCommands` into `managePorts` builtin Signed-off-by: Diego Quintero <diquintero@unal.edu.co>
|
Kudos, SonarCloud Quality Gate passed! |










shellCommandsbuiltin inmakeTemplate