Skip to content

Commit 00e99fe

Browse files
committed
address comments
1 parent 6c23ba3 commit 00e99fe

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,14 @@ export async function updateRecentResponse(
110110
}
111111

112112
const buildProcessMementoRootKey = 'samcli.build.processes'
113+
const globalIdentifier = 'global'
113114

114115
/**
115116
* Returns true if there's an ongoing build process for the provided template, false otherwise
116117
* @Param templatePath The path to the template.yaml file
117118
*/
118119
function isBuildInProgress(templatePath: string): boolean {
119-
return getRecentResponse(buildProcessMementoRootKey, 'global', templatePath) !== undefined
120+
return getRecentResponse(buildProcessMementoRootKey, globalIdentifier, templatePath) !== undefined
120121
}
121122

122123
/**
@@ -125,7 +126,7 @@ function isBuildInProgress(templatePath: string): boolean {
125126
*/
126127
export function throwIfTemplateIsBeingBuilt(templatePath: string) {
127128
if (isBuildInProgress(templatePath)) {
128-
throw new ToolkitError('Template is already being built', { code: 'BuildInProgress' })
129+
throw new ToolkitError('This template is already being built', { code: 'BuildInProgress' })
129130
}
130131
}
131132

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ describe('SAM runBuild', () => {
442442
},
443443
(e: any) => {
444444
assert.strictEqual(e instanceof ToolkitError, true)
445-
assert.strictEqual(e.message, 'Template is already being built')
445+
assert.strictEqual(e.message, 'This template is already being built')
446446
assert.strictEqual(e.code, 'BuildInProgress')
447447
return true
448448
}

0 commit comments

Comments
 (0)