Closed lucaboesch closed 3 years ago
It seems the relative paths are broken in a way that they must be relative to the directory where generate.php
is located. Thence --recipe=example.yaml
works because they are in the same folder.
This happened to me as well and strikes me as an unexpected behavior. It would be easily ameliorated by changing the error message to "Recipe file not found" or similar.
Commit 418380e082b84f18d8451dfd05b24f3ba537b767 introduces support for relative paths on operating systems that support the PWD
environment variable.
I'm trying to use the Plugin Skeleton Generator (Moodle 3.6 weekly master) and it keeps giving "Invalid recipe file!" Intuitively even trying
php cli/generate.php --recipe=cli/example.yaml --target-dir=/tmp
which I would suppose should work (since you are giving that example file away) does trigger that warning. It turns out you have to pass the absolute path to the YAML recipe file. Then the skeleton generation succeeds.