fix(tools): return complete subroutine results in anvil-access-module

main
Tsu-ba-me 2 years ago
parent 40dd856c50
commit 2e5edfdcf0
  1. 4
      tools/anvil-access-module

@ -208,8 +208,8 @@ elsif ($anvil->${sub_module_name}->can($sub_name))
$anvil->nice_exit({ exit_code => 1 }); $anvil->nice_exit({ exit_code => 1 });
} }
my $results = $anvil->${sub_module_name}->${sub_name}($decoded_sub_params); my (@results) = $anvil->${sub_module_name}->${sub_name}($decoded_sub_params);
print JSON->new->utf8->encode({ sub_results => $results })."\n"; print JSON->new->utf8->encode({ sub_results => scalar(@results) > 1 ? \@results : $results[0] })."\n";
} }
elsif ($data_hash) elsif ($data_hash)
{ {

Loading…
Cancel
Save