jordansissel / fpm

Effing package management! Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.
http://fpm.readthedocs.io/en/latest/
Other
11.16k stars 1.07k forks source link

dotenv upgrade caused problems #1919

Open jordansissel opened 2 years ago

jordansissel commented 2 years ago

Related:

pleaserun is probably not used much (if I had to guess). Further fpm doesn't even use the part of pleaserun that invokes dotenv:

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 the pleaserun 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 remove dotenv dependency or isolate the require "dotenv/parser" call to only load dotenv when it is needed instead of at startup.

jordansissel commented 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.