2020-09-30 13:11:33 +08:00
|
|
|
// Copyright 2020 The Gitea Authors. All rights reserved.
|
2023-09-08 09:40:02 +08:00
|
|
|
// SPDX-License-Identifier: MIT
|
2020-09-30 13:11:33 +08:00
|
|
|
|
|
|
|
package login
|
|
|
|
|
|
|
|
import (
|
|
|
|
"code.gitea.io/tea/cmd/flags"
|
|
|
|
"code.gitea.io/tea/modules/config"
|
|
|
|
|
|
|
|
"github.com/skratchdot/open-golang/open"
|
|
|
|
"github.com/urfave/cli/v2"
|
|
|
|
)
|
|
|
|
|
|
|
|
// CmdLoginEdit represents to login a gitea server.
|
|
|
|
var CmdLoginEdit = cli.Command{
|
|
|
|
Name: "edit",
|
2020-12-17 00:47:40 +08:00
|
|
|
Aliases: []string{"e"},
|
2020-09-30 13:11:33 +08:00
|
|
|
Usage: "Edit Gitea logins",
|
|
|
|
Description: `Edit Gitea logins`,
|
2022-09-14 02:14:02 +08:00
|
|
|
ArgsUsage: " ", // command does not accept arguments
|
2020-09-30 13:11:33 +08:00
|
|
|
Action: runLoginEdit,
|
|
|
|
Flags: []cli.Flag{&flags.OutputFlag},
|
|
|
|
}
|
|
|
|
|
2020-12-12 21:28:37 +08:00
|
|
|
func runLoginEdit(_ *cli.Context) error {
|
2020-09-30 13:11:33 +08:00
|
|
|
return open.Start(config.GetConfigPath())
|
|
|
|
}
|