File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -110,13 +110,14 @@ export async function updateRecentResponse(
110110}
111111
112112const 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 */
118119function 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 */
126127export 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
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments