Motivation: I would like to copy a file
foo.barto\jobname.barbefore everypdflatexrun. So I thought, I could modify an existingarararule.
I wanted to try the hello.yaml rule for arara from this answer: https://tex.stackexchange.com/a/119246/36296
!config
# Hello world
# author: Chris Hughes, Paulo Cereda
# last edited by: cmh, June 14th 2013
# requires arara 3.0+
#
# Sample usage:
#
# % arara: hello
# % arara: hello: {name: A.Ellett}
#
# This rule is really just a shortcut for commands like the following
#
# hello
# or
# hello A.Ellett
#
identifier: hello
name: hello
commands:
- <arara> bash -i -c hello @{name}
arguments:
- identifier: name
flag: <arara> @{parameters.name}
default: "world"
But if I try to run this rule with
% arara: hello
in my .tex file, I get the following error message:
I have spotted an error in rule 'hello' located at '<path to arara>/rules'. I could not parse the rule, something bad happened. Apparently, the provided YAML file is invalid. I will do my best to help you in any way I can. There are more details available on this exception:DETAILS --------------------------------------------------------- Cannot create property=commands for JavaBean=com.github.cereda.arara.model.Rule@55a1c291 in 'reader', line 1, column 1: !config ^ No single argument constructor found for class com.github.cereda.arara.model.RuleCommand in 'reader', line 21, column 1: - <arara> bash -i -c hello @{name} ^
(I replaced <path to arara> in the above message, as the original one contained my user name; I have other custom .yaml files for arara in the same location which work flawlessly)
The bash function itself seems to work. If I do
bash -i -c hello sam
within a terminal, I get
Hello, sam!
as expected.
I am using arara 4.0. Any ideas what might be wrong?