Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf572e18

Browse files
authored
fix: fix cliui prompt styling (#11899)
1 parent207328c commitf572e18

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

‎cli/cliui/prompt.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ func Prompt(inv *clibase.Invocation, opts PromptOptions) (string, error) {
7171
}else {
7272
renderedNo=Bold(ConfirmNo)
7373
}
74-
pretty.Fprintf(inv.Stdout,DefaultStyles.Placeholder,"(%s/%s) ",renderedYes,renderedNo)
74+
_,_=fmt.Fprintf(inv.Stdout,"(%s/%s) ",renderedYes,renderedNo)
7575
}elseifopts.Default!="" {
76-
_,_=fmt.Fprint(inv.Stdout,pretty.Sprint(DefaultStyles.Placeholder,"("+opts.Default+") "))
76+
_,_=fmt.Fprintf(inv.Stdout,"(%s) ",pretty.Sprint(DefaultStyles.Placeholder,opts.Default))
7777
}
7878
interrupt:=make(chan os.Signal,1)
7979

‎cli/restart.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func (r *RootCmd) restart() *clibase.Cmd {
4141
}
4242

4343
_,err=cliui.Prompt(inv, cliui.PromptOptions{
44-
Text:"Confirm restart workspace?",
44+
Text:"Restart workspace?",
4545
IsConfirm:true,
4646
})
4747
iferr!=nil {

‎cli/restart_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func TestRestart(t *testing.T) {
8484

8585
matches:= []string{
8686
ephemeralParameterDescription,ephemeralParameterValue,
87-
"Confirm restart workspace?","yes",
87+
"Restart workspace?","yes",
8888
"Stopping workspace","",
8989
"Starting workspace","",
9090
"workspace has been restarted","",
@@ -138,7 +138,7 @@ func TestRestart(t *testing.T) {
138138
}()
139139

140140
matches:= []string{
141-
"Confirm restart workspace?","yes",
141+
"Restart workspace?","yes",
142142
"Stopping workspace","",
143143
"Starting workspace","",
144144
"workspace has been restarted","",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp