File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -163,10 +163,16 @@ pub async fn start_executor_process(
163163 let scheduler_port = opt. scheduler_port ;
164164 let scheduler_url = format ! ( "http://{scheduler_host}:{scheduler_port}" ) ;
165165
166- let work_dir = opt
167- . work_dir
168- . clone ( )
169- . unwrap_or ( TempDir :: new ( ) ?. path ( ) . to_str ( ) . unwrap ( ) . to_string ( ) ) ;
166+ let work_dir = if let Some ( work_dir) = opt. work_dir . clone ( ) {
167+ work_dir
168+ } else if let Some ( temp_dir) = TempDir :: new ( ) ?. path ( ) . to_str ( ) . map ( ToOwned :: to_owned)
169+ {
170+ temp_dir
171+ } else {
172+ return Err ( BallistaError :: Configuration (
173+ "Unable to bind work dir" . to_string ( ) ,
174+ ) ) ;
175+ } ;
170176
171177 let concurrent_tasks = if opt. concurrent_tasks == 0 {
172178 // use all available cores if no concurrency level is specified
You can’t perform that action at this time.
0 commit comments