Gankra / cargo-mommy

Mommy's here to support you when running cargo~
https://faultlore.com/cargo-mommy/
Apache License 2.0
726 stars 49 forks source link

mommy shouldn't uses envvars with spaces in the names when her role is many words~ #51

Closed Lymkwi closed 9 months ago

Lymkwi commented 9 months ago

If you use the i mean feature to convert mommy into a binary which has a space in its name, it will correctly infer the correct role up to the point where it needs to find the names of environment variables to fetch information from.

In a hypothetical scenario, I was able to have it spit this:

/ ~ cargo mommy i mean "big sis"
mommy is now big sis~
/ ~ CARGO_BIG_SISS_LITTLE=TEST cargo "big sis" --help
[ SNIP ]
SCREAMING_ROLE: BIG SIS
SCREAMING_ROLE: BIG SIS
SCREAMING_ROLE: BIG SIS
SCREAMING_ROLE: BIG SIS
SCREAMING_ROLE: BIG SIS
big sis loves her cute little girl~ 💗

IMO, the correct behaviour should be that spaces be replaced with "_" when converting to screaming_role.