Skip to content

Commit 9c5a7ee

Browse files
committed
Address comments
1 parent c65ec57 commit 9c5a7ee

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/core/src/shared/sam/build.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,11 @@ export async function runBuild(arg?: TreeNode): Promise<SamBuildResult> {
242242
cancellable: true,
243243
location: vscode.ProgressLocation.Notification,
244244
},
245-
async (progress) => {
245+
async (progress, token) => {
246+
token.onCancellationRequested(async () => {
247+
throw new CancellationError('user')
248+
})
249+
246250
progress.report({ message: `Building SAM template at ${params.template.uri.path}` })
247251

248252
// Create a child process to run the SAM build command
@@ -258,8 +262,6 @@ export async function runBuild(arg?: TreeNode): Promise<SamBuildResult> {
258262
}
259263
)
260264

261-
await unregisterTemplateBuild(params.template.uri.path)
262-
263265
return {
264266
isSuccess: true,
265267
}

0 commit comments

Comments
 (0)