Skip to content

Replace magic env variables where possible #563

Description

@OGKevin

lazy_static! {
// TODO(OGKevin): we shan't rely on these env variables to construct the device, and instead
// do discovery here instead of in the bash script.
/// Global singleton for the current device.
pub static ref CURRENT_DEVICE: Device = {
let product = env::var("PRODUCT").unwrap_or_default();
let model_number = env::var("MODEL_NUMBER").unwrap_or_default();
Device::new(&product, &model_number)
};
}

Ref:

Metadata

Metadata

Assignees

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions