File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed
Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -195,11 +195,11 @@ async function devContainerBuild(
195195 args . additionalCacheFroms . forEach ( cacheFrom =>
196196 commandArgs . push ( '--cache-from' , cacheFrom ) ,
197197 ) ;
198- if ( args . cacheTo ) {
199- args . cacheTo . forEach ( cacheTo =>
200- commandArgs . push ( '--cache-to' , cacheTo ) ,
201- ) ;
202- }
198+ }
199+ if ( args . cacheTo ) {
200+ args . cacheTo . forEach ( cacheTo =>
201+ commandArgs . push ( '--cache-to' , cacheTo ) ,
202+ ) ;
203203 }
204204 return await runSpecCliJsonCommand < DevContainerCliBuildResult > ( {
205205 args : commandArgs ,
@@ -217,6 +217,7 @@ export interface DevContainerCliUpArgs {
217217 workspaceFolder : string ;
218218 configFile : string | undefined ;
219219 additionalCacheFroms ?: string [ ] ;
220+ cacheTo ?: string [ ] ;
220221 skipContainerUserIdUpdate ?: boolean ;
221222 env ?: string [ ] ;
222223 userDataFolder ?: string ;
@@ -241,6 +242,11 @@ async function devContainerUp(
241242 commandArgs . push ( '--cache-from' , cacheFrom ) ,
242243 ) ;
243244 }
245+ if ( args . cacheTo ) {
246+ args . cacheTo . forEach ( cacheTo =>
247+ commandArgs . push ( '--cache-to' , cacheTo ) ,
248+ ) ;
249+ }
244250 if ( args . userDataFolder ) {
245251 commandArgs . push ( "--user-data-folder" , args . userDataFolder ) ;
246252 }
Original file line number Diff line number Diff line change @@ -89,7 +89,9 @@ async function buildImageBase(
8989 }
9090 cacheFrom . forEach ( cacheValue => args . push ( '--cache-from' , cacheValue ) ) ;
9191 if ( cacheTo ) {
92- cacheTo . forEach ( cacheValue => args . push ( '--cache-to' , cacheValue ) ) ;
92+ coerceToArray ( cacheTo ) . forEach ( cacheValue =>
93+ args . push ( '--cache-to' , cacheValue ) ,
94+ ) ;
9395 } else {
9496 args . push ( '--cache-to' ) ;
9597 args . push ( 'type=inline' ) ;
You can’t perform that action at this time.
0 commit comments