Skip to content

Commit

Permalink
[Fleet] Fix loading assets manifest (elastic#190650)
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet authored Aug 16, 2024
1 parent 7e28ee8 commit eebf341
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x-pack/plugins/fleet/server/services/epm/packages/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import * as yaml from 'js-yaml';
import { safeLoad } from 'js-yaml';
import pMap from 'p-map';
import type { SavedObjectsClientContract, SavedObjectsFindOptions } from '@kbn/core/server';
import semverGte from 'semver/functions/gte';
Expand Down Expand Up @@ -360,7 +360,7 @@ export async function getInstalledPackageManifests(

const parsedManifests = result.saved_objects.reduce<Map<string, PackageSpecManifest>>(
(acc, asset) => {
acc.set(asset.attributes.asset_path, yaml.load(asset.attributes.data_utf8));
acc.set(asset.attributes.asset_path, safeLoad(asset.attributes.data_utf8));
return acc;
},
new Map()
Expand Down

0 comments on commit eebf341

Please sign in to comment.