Commit de12d11 1 parent 095b4b4 commit de12d11 Copy full SHA for de12d11
File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ export default class CommandHelp {
100
100
const body = renderList ( args . map ( a => {
101
101
const name = a . name . toUpperCase ( )
102
102
let description = a . description || ''
103
- if ( a . default ) description = `[default: ${ a . default } ] ${ description } `
103
+ if ( a . default !== '' && a . default !== undefined ) description = `[default: ${ a . default } ] ${ description } `
104
104
if ( a . options ) description = `(${ a . options . join ( '|' ) } ) ${ description } `
105
105
return [ name , description ? dim ( description ) : undefined ]
106
106
} ) , { stripAnsi : this . opts . stripAnsi , maxWidth : this . opts . maxWidth - 2 } )
@@ -144,7 +144,7 @@ export default class CommandHelp {
144
144
}
145
145
146
146
let right = flag . description || ''
147
- if ( flag . type === 'option' && flag . default ) {
147
+ if ( flag . type === 'option' && flag . default !== '' && flag . default !== undefined ) {
148
148
right = `[default: ${ flag . default } ] ${ right } `
149
149
}
150
150
if ( flag . required ) right = `(required) ${ right } `
You can’t perform that action at this time.
0 commit comments