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(
195
195
args . additionalCacheFroms . forEach ( cacheFrom =>
196
196
commandArgs . push ( '--cache-from' , cacheFrom ) ,
197
197
) ;
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
+ ) ;
203
203
}
204
204
return await runSpecCliJsonCommand < DevContainerCliBuildResult > ( {
205
205
args : commandArgs ,
@@ -217,6 +217,7 @@ export interface DevContainerCliUpArgs {
217
217
workspaceFolder : string ;
218
218
configFile : string | undefined ;
219
219
additionalCacheFroms ?: string [ ] ;
220
+ cacheTo ?: string [ ] ;
220
221
skipContainerUserIdUpdate ?: boolean ;
221
222
env ?: string [ ] ;
222
223
userDataFolder ?: string ;
@@ -241,6 +242,11 @@ async function devContainerUp(
241
242
commandArgs . push ( '--cache-from' , cacheFrom ) ,
242
243
) ;
243
244
}
245
+ if ( args . cacheTo ) {
246
+ args . cacheTo . forEach ( cacheTo =>
247
+ commandArgs . push ( '--cache-to' , cacheTo ) ,
248
+ ) ;
249
+ }
244
250
if ( args . userDataFolder ) {
245
251
commandArgs . push ( "--user-data-folder" , args . userDataFolder ) ;
246
252
}
Original file line number Diff line number Diff line change @@ -89,7 +89,9 @@ async function buildImageBase(
89
89
}
90
90
cacheFrom . forEach ( cacheValue => args . push ( '--cache-from' , cacheValue ) ) ;
91
91
if ( cacheTo ) {
92
- cacheTo . forEach ( cacheValue => args . push ( '--cache-to' , cacheValue ) ) ;
92
+ coerceToArray ( cacheTo ) . forEach ( cacheValue =>
93
+ args . push ( '--cache-to' , cacheValue ) ,
94
+ ) ;
93
95
} else {
94
96
args . push ( '--cache-to' ) ;
95
97
args . push ( 'type=inline' ) ;
You can’t perform that action at this time.
0 commit comments