@@ -83,16 +83,17 @@ export class BridgeCachePlugin implements IRushPlugin {
83
83
) : Promise < void > => {
84
84
const { buildCacheConfiguration } = context ;
85
85
const { terminal } = logger ;
86
+
87
+ if ( cacheAction === undefined ) {
88
+ return ;
89
+ }
90
+
86
91
if ( ! buildCacheConfiguration ?. buildCacheEnabled ) {
87
92
throw new Error (
88
93
`The build cache must be enabled to use the "${ this . _actionParameterName } " parameter.`
89
94
) ;
90
95
}
91
96
92
- if ( cacheAction === undefined ) {
93
- return ;
94
- }
95
-
96
97
const filteredOperations : Set < IOperationExecutionResult > = new Set ( ) ;
97
98
for ( const operationExecutionResult of recordByOperation . values ( ) ) {
98
99
if ( ! operationExecutionResult . operation . isNoOp ) {
@@ -122,6 +123,7 @@ export class BridgeCachePlugin implements IRushPlugin {
122
123
terminal . writeLine (
123
124
`Operation "${ operation . name } ": Outputs have been restored from the build cache."`
124
125
) ;
126
+ terminal . writeLine ( `Cache key: ${ projectBuildCache . cacheId } ` ) ;
125
127
} else {
126
128
terminal . writeWarningLine (
127
129
`Operation "${ operation . name } ": Outputs could not be restored from the build cache.`
@@ -155,6 +157,7 @@ export class BridgeCachePlugin implements IRushPlugin {
155
157
terminal . writeLine (
156
158
`Operation "${ operation . name } ": Existing outputs have been successfully written to the build cache."`
157
159
) ;
160
+ terminal . writeLine ( `Cache key: ${ projectBuildCache . cacheId } ` ) ;
158
161
} else {
159
162
terminal . writeErrorLine (
160
163
`Operation "${ operation . name } ": An error occurred while writing existing outputs to the build cache.`
@@ -179,6 +182,7 @@ export class BridgeCachePlugin implements IRushPlugin {
179
182
const cacheActionParameter : CommandLineParameter | undefined = context . customParameters . get (
180
183
this . _actionParameterName
181
184
) ;
185
+
182
186
if ( cacheActionParameter ) {
183
187
if ( cacheActionParameter . kind !== CommandLineParameterKind . Choice ) {
184
188
throw new Error (
0 commit comments