Test-More / Test2-Harness

Alternative to Test::Harness
Other
23 stars 26 forks source link

"Could not find yath" when using local::lib #210

Open jon-gentle-vectorsolutions opened 3 years ago

jon-gentle-vectorsolutions commented 3 years ago

We use local::lib style installs extensively for our application. Recently we started using Test2::Harness into local::lib to do our testing. We have ran into an issue when trying to install Test2::Harness::Renderer::JUnit, it uses App::Yath::Util::find_yath for its tests. However, the tests fail because App::Yath::Util::find_yath will not find the local::lib installed yath script since its not in %Config.

Below is an example of how to replicate this. I suspect this is related to https://github.com/cpanel/Test2-Harness-Renderer-JUnit/issues/14 .

> mkdir find_yath_test
> cd find_yath_test/
> cpanm -L local App::Yath::Util
--> Working on App::Yath::Util
...
Building and testing Test2-Harness-1.000042 ... OK
Successfully installed Test2-Harness-1.000042
15 distributions installed
> eval $(perl -Mlocal::lib=local)
> which yath
/.../find_yath_test/local/bin/yath
> perl -MApp::Yath::Util -e 'warn App::Yath::Util::find_yath'
Could not find yath in Config paths at /.../find_yath_test/local/lib/perl5/App/Yath/Util.pm line 52.