Skip to content

Commit

Permalink
[Fleet] Fix unpackBufferToCache to avoid getting cache in a non valid…
Browse files Browse the repository at this point in the history
… state (elastic#173201)
  • Loading branch information
nchaulet authored Dec 13, 2023
1 parent 4936d8c commit 3fbd25b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/server/services/epm/archive/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ export async function unpackBufferToCache({
contentType: string;
archiveBuffer: Buffer;
}): Promise<string[]> {
const entries = await unpackBufferEntries(archiveBuffer, contentType);
// Make sure any buffers from previous installations from registry or upload are deleted first
clearPackageFileCache({ name, version });

const entries = await unpackBufferEntries(archiveBuffer, contentType);
const paths: string[] = [];
entries.forEach((entry) => {
const { path, buffer } = entry;
Expand Down

0 comments on commit 3fbd25b

Please sign in to comment.