Open jordansissel opened 2 years ago
As in #1950, I think delayed loading should work here. That is, moving the require "pleaserun/...."
statements into the input
method should be enough. This will make it so that folks only experience this failure if they are using fpm -s pleaserun ...
which is likely to be uncommon.
Related:
pleaserun
is probably not used much (if I had to guess). Furtherfpm
doesn't even use the part ofpleaserun
that invokesdotenv
:https://github.com/jordansissel/pleaserun/blob/fb79910a2dcdb26c463b02ce65d27bd34cbbdfdd/lib/pleaserun/platform/base.rb#L239
The feature in pleaserun that invokes
dotenv
is when someone sets the--environment-file
flag when running thepleaserun
command-line tool. Looking at the fpm code using pleaserun, I'm pretty sure this feature is not used in fpm and it is safe to isolate away to prevent future fpm users having issues.Proposal: In
pleaserun
, either removedotenv
dependency or isolate therequire "dotenv/parser"
call to only load dotenv when it is needed instead of at startup.