@@ -105,7 +105,15 @@ impl<'a> VolumeApi<'a> {
105105 mounts : & HashMap < String , String > ,
106106 ) -> HashMap < TargetPath , DataEntryVolumeSpec > {
107107 let mut result = HashMap :: new ( ) ;
108- for ( target, source_key) in mounts {
108+
109+ let mut mount_entries: HashMap < String , String > = HashMap :: new ( ) ;
110+ mount_entries. extend ( mounts. clone ( ) ) ;
111+
112+ if !mounts. values ( ) . any ( |key| key == "work" ) {
113+ mount_entries. insert ( "/work" . to_string ( ) , "work" . to_string ( ) ) ;
114+ }
115+
116+ for ( target, source_key) in mount_entries {
109117 let source_key = DataEntryKey ( source_key. to_string ( ) ) ;
110118 let source_exists = volumes. contains_key ( & source_key) ;
111119 if !source_exists {
@@ -133,6 +141,12 @@ impl<'a> VolumeApi<'a> {
133141 let mut data_entries = vec ! [ ] ;
134142 data_entries. extend_from_slice ( data. clone ( ) . into_entries ( ) . as_slice ( ) ) ;
135143
144+ if !data. contains_key ( "work" ) {
145+ data_entries. push ( DataEntry :: Dir {
146+ name : "work" . to_string ( ) ,
147+ } ) ;
148+ }
149+
136150 let files_key = "files" ;
137151 let files_volume_spec = VolumeSpec {
138152 name : Self :: volume_name ( workspace_key, files_key) ,
0 commit comments