summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-08-13 20:49:30 +0800
committerGitHub <noreply@github.com>2023-08-13 20:49:30 +0800
commit82ea557dd37312af02b991069e2debb71721882b (patch)
tree70de5e1099d2cd43ef2861c00bced7dc67e45a7c /cmd
parentca74b074ea84dea1c37f7bd04b299de602e57e8c (diff)
downloadgitea-82ea557dd37312af02b991069e2debb71721882b.tar.gz
gitea-82ea557dd37312af02b991069e2debb71721882b.zip
Fix stderr usages (#26477)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/admin_user_create.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd/admin_user_create.go b/cmd/admin_user_create.go
index 260d729544..52ce46c353 100644
--- a/cmd/admin_user_create.go
+++ b/cmd/admin_user_create.go
@@ -6,7 +6,6 @@ package cmd
import (
"errors"
"fmt"
- "os"
auth_model "code.gitea.io/gitea/models/auth"
user_model "code.gitea.io/gitea/models/user"
@@ -87,7 +86,7 @@ func runCreateUser(c *cli.Context) error {
username = c.String("username")
} else {
username = c.String("name")
- fmt.Fprintf(os.Stderr, "--name flag is deprecated. Use --username instead.\n")
+ _, _ = fmt.Fprintf(c.App.ErrWriter, "--name flag is deprecated. Use --username instead.\n")
}
ctx, cancel := installSignals()