runtime: default working directories to data dir

This commit is contained in:
Keisuke Hirata 2026-07-09 19:24:04 +09:00
parent fa233ba025
commit d216b10100
No known key found for this signature in database

View File

@ -123,10 +123,16 @@ fn working_directory_runtime_root(config: &ProcessConfig) -> PathBuf {
_ => config
.worker_runtime_base_dir
.clone()
.unwrap_or_else(|| env::temp_dir().join("yoi-worker-runtime")),
.unwrap_or_else(default_working_directory_runtime_root),
}
}
fn default_working_directory_runtime_root() -> PathBuf {
manifest::paths::data_dir()
.map(|data_dir| data_dir.join("worker-runtime"))
.unwrap_or_else(|| env::temp_dir().join("yoi-worker-runtime"))
}
fn runtime_options_from_http(config: &RuntimeHttpServerConfig) -> RuntimeOptions {
RuntimeOptions {
runtime_id: config.runtime_id.clone(),