I released Rex-1.14.3 today, making it available both on CPAN and in my Gentoo overlay.
This version of the friendly automation framework contains bug fixes for local package installation, command existence checks, and git tests.
Fix local package installation
An older contribution aimed at improving OpenBSD management capabilities had unintended side effects, and – depending on other circumstances – caused warnings or errors during local package management tasks.
Various command execution built-ins support passing a set of environment variables in a form of key value pairs as a hash reference. The problem came from lack of tests in the original changeset, and then mistakenly setting the default set of environment variable to an empty array instead of an empty hash reference.
I added relevant tests and fixed the default value.
Fix checking command existence
In rare cases, command existence checks return an exit code indicating success, while actually reporting an error in their output.
Rex already could recognize such a case for Solaris systems, and cross-checked the output if the command output contains the “no command in” string. This time a similar situation happened with a Windows system apparently set to use the German language.
It made clear that such a string matching strategy would not scale far: even if we could reliably control the language of the messages across all operating systems, we would have to maintain a list of possible messages for these corner cases.
Instead, Rex now double-checks whether the command candidate actually exists in the file system or not.
Fix tests related to Git functionality
The previous Rex-1.14.2 came with a new set of tests for Git functionality, and it all looked fine in our GitHub Actions workflows exercising the test suite on Linux, Mac OS, and Windows for several Perl versions.
Often we make a trial release of Rex before making it final, and wait for further input from CPAN Testers. Before Rex-1.14.2 I made a mistake by deciding to skip the trial release, as we learned about several corner cases needing follow-up fixes.
- The test suite checked for the presence of the
gitcommand, but attempted to declare a plan twice instead of properly skipping. This essentially made Git a hard test-time dependency instead of an optional one.
- Global and system Git configuration could affect git behavior during tests.
- Git versions before 1.8.5 did not have a
-Ccommand line flag to change into the specified directory before executing their subcommands.
I fixed all the above, and made several TRIAL releases before Rex-1.14.3 again.