ugexe / zef

Raku Module Management
Artistic License 2.0
207 stars 44 forks source link

Feature request: Detect and nullify env var TEST_AUTHOR during test mode #433

Closed tbrowder closed 2 years ago

tbrowder commented 2 years ago

The environment variable TEST_AUTHOR is used by module authors for their own testing. If defined, it may cause an unintended test failure for some modules. Therefore, it shouldn't be respected by zef during module installation unless some new zef option is specifically used. For example:

   zef install --test-author Foo

This is not a zef bug, but it was discovered when trying to install Spreadsheet::Libxlsxio when I had TEST_AUTHOR defined. I solved the immediate problem by executing:

    export TEST_AUTHOR=""; zef install Spreadsheet::Libxslxio

OS: Debian 10 Rakudo: 2021.12

ugexe commented 2 years ago

What if someone wants to run the author tests anyway? Generally as an author you probably shouldn't be doing export TEST_AUTHOR=1, but instead setting it on a per-command basis i.e. TEST_AUTHOR=1 prove t/ explicitly when testing your own stuff.

tbrowder commented 2 years ago

I agree. I have removed my TEST_AUTHOR environment variable from my bash_aliases file.