Fix --create-user usage error message
This commit is contained in:
parent
c11ede53d9
commit
cd752858b7
6
app.go
6
app.go
|
@ -531,7 +531,11 @@ func adminCreateUser(app *app, credStr string, isAdmin bool) error {
|
|||
// Create an admin user with --create-admin
|
||||
creds := strings.Split(credStr, ":")
|
||||
if len(creds) != 2 {
|
||||
return fmt.Errorf("usage: writefreely --create-admin username:password")
|
||||
c := "user"
|
||||
if isAdmin {
|
||||
c = "admin"
|
||||
}
|
||||
return fmt.Errorf("usage: writefreely --create-%s username:password", c)
|
||||
}
|
||||
|
||||
loadConfig(app)
|
||||
|
|
Loading…
Reference in New Issue