Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): support variables in config warn checks #6136

Merged
merged 4 commits into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
run: |
git config user.name "Github Workflow (on behalf of ${{ github.actor }})"
git config user.email "users.noreply.github.com"
npm run ci:publish:dev
npm run ci:publish:dev
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