Skip to content
Myr

Trim description when there's only extra info (#2348)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Misha Kaletsky · committed by GitHub · parent 9d941f8 · Browse files · 2 files+17 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Misha Kaletsky <mmkal@users.noreply.github.com>

Diff stats

2 files+17 added−1 removed

  • tests:+12 added−0 removed
  • other:+5 added−1 removed

2 files+17 added−1 removed

modified:lib/help.js+5 added-1 removed
350 unmodified lines
351 if (option.envVar !== undefined) {352 extraInfo.push(`env: ${option.envVar}`);353 }354 if (extraInfo.length > 0) {355 return `${option.description} (${extraInfo.join(', ')})`;355 const extraDescription = `(${extraInfo.join(', ')})`;356 if (option.description) {357 return `${option.description} ${extraDescription}`;358 }359 return extraDescription;360 }361362 return option.description;363 }
350 unmodified lines
modified:tests/help.optionDescription.test.js+12 added