()
| 136 | } |
| 137 | |
| 138 | pub fn from_env() -> anyhow::Result<Self> { |
| 139 | // Note: we fallback to trying to find a config file called `FUZZWARE_CONFIG` for |
| 140 | // compatibility with earlier version of the code. |
| 141 | let config_path = std::env::var_os("TARGET_CONFIG") |
| 142 | .or_else(|| std::env::var_os("FUZZWARE_CONFIG")) |
| 143 | .ok_or_else(|| anyhow::format_err!("TARGET_CONFIG not set"))?; |
| 144 | Self::from_path(config_path.as_ref()) |
| 145 | } |
| 146 | |
| 147 | pub fn from_path(target: &std::path::Path) -> anyhow::Result<Self> { |
| 148 | // Allow the config to specified either with a full path to a config file or to a folder |
nothing calls this directly
no outgoing calls
no test coverage detected