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

[TIMOB-17221] Fixed formatting of multiline issues in 'ti info'. Fixed d... #147

Merged
merged 1 commit into from
Jun 27, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* Fixed bug with boolean config setting values being saved as integers [TIMOB-17087]
* Moved the sending of analytics from the 'exit' event to the command finished callback [TIMOB-17046]
* Fixed bug where the CLI would wait for analytics to send [TIMOB-17206]
* Fixed formatting of multiline issues in 'ti info' [TIMOB-17221]
* Fixed display of Android tools that are newer than the maximum supported version [TIMOB-17221]

3.2.3 (5/1/2014)
-------------------
Expand Down
8 changes: 5 additions & 3 deletions lib/commands/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -647,9 +647,11 @@ exports.run = function (logger, config, cli, finished) {
if (types.all || types[type]) {
logger.log(styleHeading(__('%s Issues', sections.filter(function (s) { return s.name == type; }).shift().title)));
issues[type].forEach(function (issue) {
var msg = appc.string.wrap(issue.message.split('\n').map(function (line) {
return line.trim().replace(/(__(.+?)__)/g, '$2'.bold);
}).join(' '), config.get('cli.width', 120) - 5).replace(/\n/g, '\n ') + '\n';
var msg = issue.message.split('\n\n').map(function (chunk) {
return appc.string.wrap(chunk.split('\n').map(function (line) {
return line.replace(/(__(.+?)__)/g, '$2'.bold);
}).join('\n'), config.get('cli.width', 120) - 5).replace(/\n/g, '\n ') + '\n';
}).join('\n ');

if (issue.type == 'error') {
logger.log((' ' + (process.platform == 'win32' ? '\u00D7' : '\u2715') + ' ' + msg).red);
Expand Down
12 changes: 9 additions & 3 deletions lib/commands/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -959,23 +959,29 @@ SetupScreens.prototype.check = function check(callback) {
ok('sdk', __('installed'), '(' + r.sdk.path + ')');

if (r.sdk.tools && r.sdk.tools.path) {
if (r.sdk.tools.supported) {
if (r.sdk.tools.supported === 'maybe') {
warn('tools', __('untested version %s; may or may not work', r.sdk.tools.version));
} else if (r.sdk.tools.supported) {
ok('tools', __('installed'), '(v' + r.sdk.tools.version + ')');
} else {
bad('tools', __('unsupported version %s', r.sdk.tools.version));
}
}

if (r.sdk.platformTools && r.sdk.platformTools.path) {
if (r.sdk.platformTools.supported) {
if (r.sdk.platformTools.supported === 'maybe') {
warn('platform tools', __('untested version %s; may or may not work', r.sdk.platformTools.version));
} else if (r.sdk.platformTools.supported) {
ok('platform tools', __('installed'), '(v' + r.sdk.platformTools.version + ')');
} else {
bad('platform tools', __('unsupported version %s', r.sdk.platformTools.version));
}
}

if (r.sdk.buildTools && r.sdk.buildTools.path) {
if (r.sdk.buildTools.supported) {
if (r.sdk.buildTools.supported === 'maybe') {
warn('build tools', __('untested version %s; may or may not work', r.sdk.buildTools.version));
} else if (r.sdk.buildTools.supported) {
ok('build tools', __('installed'), '(v' + r.sdk.buildTools.version + ')');
} else {
bad('build tools', __('unsupported version %s', r.sdk.buildTools.version));
Expand Down
1 change: 1 addition & 0 deletions locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@
"distribution cert": "distribution cert",
"dev provisioning": "dev provisioning",
"Android Environment": "Android Environment",
"untested version %s; may or may not work": "untested version %s; may or may not work",
"unsupported version %s": "unsupported version %s",
"\"adb\" executable not found; please reinstall Android SDK": "\"adb\" executable not found; please reinstall Android SDK",
"\"android\" executable not found; please reinstall Android SDK": "\"android\" executable not found; please reinstall Android SDK",
Expand Down