Closed PrimmR closed 1 month ago
std::env::var
won't work outside of cargo run
either. :/
I guess the only fix to this, is to convert it into a macro:
let metadata = about_metadata::from_cargo_metadata!();
tbh i wouldn't even mind removing it completely. The current impl is imo small enough to just be an example / something that devs can include in their own code 🤷
Whenever I use the
from_cargo_metadata
method ofAboutMetadata
I get the details of the muda crate instead of the binary the method is being called from, which I assume is not the intended behaviour.This could be fixed by changing the
env!
macro tostd::env::var
, as the latter means the environment variable is checked at runtime, so they hold the details of the binary, not the muda crate.