diff --git a/src/shared/populateFilePaths.ts b/src/shared/populateFilePaths.ts index 446f4634..dbff4be1 100644 --- a/src/shared/populateFilePaths.ts +++ b/src/shared/populateFilePaths.ts @@ -79,7 +79,7 @@ export const populateFilePaths = (elements: ChangeResult[], packageDirPaths: str ); // Decode the key since local components can have encoded fullNames, but results from querying // SourceMembers have fullNames that are not encoded. See: https://github.com/forcedotcom/cli/issues/1683 - const key = decodeURI(getMetadataKey(matchingComponent.type.name, matchingComponent.fullName)); + const key = decodeURIComponent(getMetadataKey(matchingComponent.type.name, matchingComponent.fullName)); elementMap.set(key, { ...elementMap.get(key), modified: true, diff --git a/src/shared/remoteSourceTrackingService.ts b/src/shared/remoteSourceTrackingService.ts index 582c67ed..c58f43e3 100644 --- a/src/shared/remoteSourceTrackingService.ts +++ b/src/shared/remoteSourceTrackingService.ts @@ -610,8 +610,8 @@ function getDecodedKeyIfSourceMembersHas({ key: string; logger: Logger; }): string { - const originalKeyDecoded = decodeURI(key); - const match = Object.keys(sourceMembers).find((memberKey) => decodeURI(memberKey) === originalKeyDecoded); + const originalKeyDecoded = decodeURIComponent(key); + const match = Object.keys(sourceMembers).find((memberKey) => decodeURIComponent(memberKey) === originalKeyDecoded); if (match) { logger.debug(`${match} matches already tracked member: ${key}`); return match;