Fix crash when cache disabled
This commit is contained in:
4
wasmtime-environ/src/cache/config.rs
vendored
4
wasmtime-environ/src/cache/config.rs
vendored
@@ -150,7 +150,9 @@ pub fn init<P: AsRef<Path> + Debug>(
|
|||||||
let conf_file_str = format!("{:?}", config_file);
|
let conf_file_str = format!("{:?}", config_file);
|
||||||
let conf = CONFIG.call_once(|| CacheConfig::from_file(enabled, config_file, create_new_config));
|
let conf = CONFIG.call_once(|| CacheConfig::from_file(enabled, config_file, create_new_config));
|
||||||
if conf.errors.is_empty() {
|
if conf.errors.is_empty() {
|
||||||
worker::init(init_file_per_thread_logger);
|
if conf.enabled {
|
||||||
|
worker::init(init_file_per_thread_logger);
|
||||||
|
}
|
||||||
debug!("Cache init(\"{}\"): {:#?}", conf_file_str, conf)
|
debug!("Cache init(\"{}\"): {:#?}", conf_file_str, conf)
|
||||||
} else {
|
} else {
|
||||||
error!(
|
error!(
|
||||||
|
|||||||
Reference in New Issue
Block a user