Skip to content

Commit 1790c3a

Browse files
committed
fixup! feat(cli): add --cache-from and --cache-to options to cartesi build
1 parent 37f8bd9 commit 1790c3a

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

apps/cli/src/commands/build.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,11 @@ const buildDriveTask = (
3939
break;
4040
}
4141
case "docker": {
42-
const effectiveDrive = {
43-
...drive,
44-
...(ctx.cacheFrom.length > 0 && {
45-
cacheFrom: ctx.cacheFrom,
46-
}),
47-
...(ctx.cacheTo.length > 0 && { cacheTo: ctx.cacheTo }),
48-
};
42+
if (ctx.cacheFrom.length > 0) drive.cacheFrom = ctx.cacheFrom;
43+
if (ctx.cacheTo.length > 0) drive.cacheTo = ctx.cacheTo;
4944
const imageInfo = await buildDocker(
5045
name,
51-
effectiveDrive,
46+
drive,
5247
sdk,
5348
destination,
5449
debug,

0 commit comments

Comments
 (0)