Skip to content

Commit 66fcffc

Browse files
Copiloticlanton
andauthored
Address code review: use Buffer.isBuffer for clearer body length check
Agent-Logs-Url: https://github.com/microsoft/rushstack/sessions/c103fb17-b8b1-4d02-88ba-9db236e9f48f Co-authored-by: iclanton <5010588+iclanton@users.noreply.github.com>
1 parent a5dfa47 commit 66fcffc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rush-plugins/rush-http-build-cache-plugin/src/HttpBuildCacheProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ export class HttpBuildCacheProvider implements ICloudBuildCacheProvider {
361361
}
362362
}
363363

364-
const bodyLength: number | string = (body as Buffer | undefined)?.length ?? 'unknown';
364+
const bodyLength: number | string = Buffer.isBuffer(body) ? body.length : 'unknown';
365365

366366
terminal.writeDebugLine(`[http-build-cache] request: ${method} ${url} ${bodyLength} bytes`);
367367

0 commit comments

Comments
 (0)