We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1bc171e commit 400f818Copy full SHA for 400f818
1 file changed
ballista/executor/src/executor_process.rs
@@ -163,10 +163,16 @@ pub async fn start_executor_process(
163
let scheduler_port = opt.scheduler_port;
164
let scheduler_url = format!("http://{scheduler_host}:{scheduler_port}");
165
166
- let work_dir = opt
167
- .work_dir
168
- .clone()
169
- .unwrap_or(TempDir::new()?.path().to_str().unwrap().to_string());
+ let work_dir = if let Some(work_dir) = opt.work_dir.clone() {
+ work_dir
+ } else if let Some(temp_dir) = TempDir::new()?.path().to_str().map(ToOwned::to_owned)
+ {
170
+ temp_dir
171
+ } else {
172
+ return Err(BallistaError::Configuration(
173
+ "Unable to bind work dir".to_string(),
174
+ ));
175
+ };
176
177
let concurrent_tasks = if opt.concurrent_tasks == 0 {
178
// use all available cores if no concurrency level is specified
0 commit comments