Skip to content

Commit

Permalink
Merge pull request #1779 from jrha/cleanup-metaconfig
Browse files Browse the repository at this point in the history
ncm-metaconfig: Fix wrapping and indentation in pan
  • Loading branch information
wpoely86 authored Dec 9, 2024
2 parents e3e18f6 + d1264d0 commit 8a6e6b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions ncm-metaconfig/src/main/pan/components/metaconfig/schema.pan
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ type ${project.artifactId}_component = {
foreach (esc_fn; srv; SELF['services']) {
if (exists(srv['actions'])) {
foreach (action; cmd_ref; srv['actions']) {
if (!(exists(SELF['commands']) && exists(SELF['commands'][cmd_ref]))) {
error('Found %s action %s for %s, but no matching command registered',
action, cmd_ref, unescape(esc_fn));
};
if (!(exists(SELF['commands']) && exists(SELF['commands'][cmd_ref]))) error(
'Found %s action %s for %s, but no matching command registered',
action, cmd_ref, unescape(esc_fn),
);
};
};
};
Expand Down
7 changes: 4 additions & 3 deletions ncm-metaconfig/src/test/resources/commands_fail_pre.pan
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ object template commands_fail_pre;

include 'simple_commands';

"/software/components/metaconfig/commands/cmd_pre_fail" =
"-" + value("/software/components/metaconfig/commands/cmd_pre");
prefix "/software/components/metaconfig";

"/software/components/metaconfig/services/{/foo/bar}/actions/pre" = "cmd_pre_fail";
"commands/cmd_pre_fail" = "-" + value("/software/components/metaconfig/commands/cmd_pre");

"services/{/foo/bar}/actions/pre" = "cmd_pre_fail";

0 comments on commit 8a6e6b8

Please sign in to comment.