Skip to content

Commit 111e486

Browse files
committed
Fix TextCommand.toString() method for no options use case
This PR fixes redhat-developer#2137. Signed-off-by: Denis Golovin [email protected]
1 parent fc8cc8e commit 111e486

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/odo/command.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class CommandText {
5757
}
5858

5959
toString(): string {
60-
return `${this.command}${this.parameter? ` ${this.privacy? 'REDACTED' : this.parameter}`: ''}${this.options? ` ${this.options.join(' ')}`: ''}`;
60+
return `${this.command}${this.parameter? ` ${this.privacy? 'REDACTED' : this.parameter}`: ''}${this.options && this.options.length > 0? ` ${this.options.join(' ')}`: ''}`;
6161
}
6262

6363
privacyMode(set: boolean): CommandText {

0 commit comments

Comments
 (0)