Skip to content

Commit

Permalink
fix(cli): support variables in config warn checks (#6136)
Browse files Browse the repository at this point in the history
  • Loading branch information
IT-MikeS committed Dec 2, 2022
1 parent e34d5f5 commit b460add
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
git config user.name "Github Workflow (on behalf of ${{ github.actor }})"
git config user.email "users.noreply.github.com"
echo $GITHUB_REF_NAME
npx lerna publish prerelease --conventional-commits --conventional-prerelease --preid dev-$(date +\"%Y%m%dT%H%M%S\") --dist-tag dev --allow-branch $GITHUB_REF_NAME --force-publish --no-verify-access --no-changelog --no-git-tag-version --no-push --yes
npx lerna publish prerelease --conventional-commits --conventional-prerelease --preid dev-$(date +"%Y%m%dT%H%M%S") --dist-tag dev --allow-branch $GITHUB_REF_NAME --force-publish --no-verify-access --no-changelog --no-git-tag-version --no-push --yes
16 changes: 12 additions & 4 deletions cli/src/cordova.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,8 @@ async function logiOSPlist(configElement: any, config: Config, plugin: Plugin) {
for (const existingElement of existingElementsArray) {
if (
existingElement.name === requiredElement.name &&
existingElement.value === requiredElement.value
(existingElement.value === requiredElement.value ||
/^[$].{1,}$/.test((requiredElement.value as string).trim()))
) {
foundMatch = true;
break;
Expand Down Expand Up @@ -909,10 +910,16 @@ export async function writeCordovaAndroidManifest(
);
for (const key of requiredELementAttrKeys) {
if (
requiredElement.attrs[key] !==
existingElement.attrs[key]
!/^[$].{1,}$/.test(
(requiredElement.attrs[key] as string).trim(),
)
) {
return false;
if (
requiredElement.attrs[key] !==
existingElement.attrs[key]
) {
return false;
}
}
}
}
Expand Down Expand Up @@ -945,6 +952,7 @@ export async function writeCordovaAndroidManifest(
}
return true;
};
/////////
const parsedExistingElements: any[] = [];
const rootKeyOfExistingElements =
Object.keys(existingElements)[0];
Expand Down

0 comments on commit b460add

Please sign in to comment.