Skip to content

Commit

Permalink
Fix cacheTo Function/container prop (#3722)
Browse files Browse the repository at this point in the history
* Fix cacheTo Function/container prop

* Sync

---------

Co-authored-by: Frank <[email protected]>
  • Loading branch information
adrianisk and fwang committed Apr 27, 2024
1 parent 9334ea5 commit 6f8fb48
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilled-laws-push.md
@@ -0,0 +1,5 @@
---
"sst": patch
---

Fix cacheTo Function/container prop
4 changes: 2 additions & 2 deletions packages/sst/src/constructs/Service.ts
Expand Up @@ -1293,8 +1293,8 @@ export class Service extends Construct implements SSTConstruct {
([pk, pv]) => `${pk}=${pv}`
)
: []
).join(","),
],
)
].join(","),,
]
: []),
this.props.path,
Expand Down
8 changes: 4 additions & 4 deletions packages/sst/src/runtime/handlers/container.ts
Expand Up @@ -284,8 +284,8 @@ export const useContainerHandler = (): RuntimeHandler => {
input.props.container?.cacheTo?.params
).map(([pk, pv]) => `${pk}=${pv}`)
: []
).join(","),
],
)
].join(","),,
]
: []),
`.`,
Expand Down Expand Up @@ -346,8 +346,8 @@ export const useContainerHandler = (): RuntimeHandler => {
input.props.container?.cacheTo?.params
).map(([pk, pv]) => `${pk}=${pv}`)
: []
).join(","),
],
)
].join(","),,
]
: []),
`--platform ${platform}`,
Expand Down
2 changes: 1 addition & 1 deletion packages/sst/test/constructs/Function.test.ts
Expand Up @@ -257,7 +257,7 @@ test("runtime: container: props", async () => {
{ type: "inline" },
{ type: "local", params: { src: ".", mode: "max" } },
],
cacheTo: { type: "inline" },
cacheTo: { type: "local", params: { dest: ".", mode: "max"} },
},
});
await app.finish();
Expand Down

0 comments on commit 6f8fb48

Please sign in to comment.