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): Updating log entries for missing .plist entries to warnings #1605

Merged
merged 2 commits into from
May 30, 2019
Merged
Changes from all 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
8 changes: 4 additions & 4 deletions cli/src/cordova.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Config } from './config';
import { getJSModules, getPlatformElement, getPluginPlatform, getPlugins, getPluginType, printPlugins, Plugin, PluginType } from './plugin';
import { copySync, ensureDirSync, readFileAsync, removeSync, writeFileAsync } from './util/fs';
import { join, resolve } from 'path';
import { buildXmlElement, installDeps, log, logError, logFatal, logInfo, readXML, resolveNode, writeXML } from './common';
import { buildXmlElement, installDeps, log, logError, logFatal, logInfo, logWarn, readXML, resolveNode, writeXML } from './common';
import { copy as fsCopy, existsSync } from 'fs-extra';
import { getAndroidPlugins } from './android/common';
import { getIOSPlugins } from './ios/common';
Expand Down Expand Up @@ -222,7 +222,7 @@ async function logiOSPlist (configElement: any, config: Config, plugin: Plugin)
if (!dict.key.includes(configElement.$.parent)) {
let xml = buildConfigFileXml(configElement);
xml = `<key>${configElement.$.parent}</key>${getConfigFileTagContent(xml)}`;
logInfo(`Plugin ${plugin.id} requires you to add \n ${xml} to your Info.plist to work`);
logWarn(`Plugin ${plugin.id} requires you to add \n ${xml} to your Info.plist to work`);
} else if (configElement.array || configElement.dict) {
if (configElement.array && configElement.array[0] && configElement.array[0].string) {
var xml = "";
Expand All @@ -232,7 +232,7 @@ async function logiOSPlist (configElement: any, config: Config, plugin: Plugin)
}
});
if (xml.length > 0) {
logInfo(`Plugin ${plugin.id} require you to add \n${xml} in the existing ${chalk.bold(configElement.$.parent)} array of your Info.plist to work`);
logWarn(`Plugin ${plugin.id} requires you to add \n${xml} in the existing ${chalk.bold(configElement.$.parent)} array of your Info.plist to work`);
}
} else {
logPossibleMissingItem(configElement, plugin);
Expand All @@ -244,7 +244,7 @@ function logPossibleMissingItem (configElement: any, plugin: Plugin) {
let xml = buildConfigFileXml(configElement);
xml = getConfigFileTagContent(xml);
xml = removeOuterTags(xml);
logInfo(`Plugin ${plugin.id} might require you to add ${xml} in the existing ${chalk.bold(configElement.$.parent)} entry of your Info.plist to work`);
logWarn(`Plugin ${plugin.id} might require you to add ${xml} in the existing ${chalk.bold(configElement.$.parent)} entry of your Info.plist to work`);
}

function buildConfigFileXml(configElement: any) {
Expand Down