remove load env file from urfave/cli

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2020-05-05 09:36:22 +08:00
parent 457861ab2a
commit b0f9b5b277
+5 -8
View File
@@ -17,6 +17,11 @@ var (
)
func main() {
// Load env-file if it exists first
if filename, found := os.LookupEnv("PLUGIN_ENV_FILE"); found {
_ = godotenv.Load(filename)
}
defaultCiphers := []string{"aes128-ctr", "aes192-ctr", "aes256-ctr", "aes128-gcm@openssh.com", "arcfour256", "arcfour128", "aes128-cbc", "3des-cbc"}
app := cli.NewApp()
@@ -156,10 +161,6 @@ func main() {
Usage: "build link",
EnvVars: []string{"DRONE_BUILD_LINK"},
},
&cli.StringFlag{
Name: "env-file",
Usage: "source env file",
},
&cli.StringFlag{
Name: "proxy.ssh-key",
Usage: "private ssh key of proxy",
@@ -275,10 +276,6 @@ REPOSITORY:
}
func run(c *cli.Context) error {
if c.String("env-file") != "" {
_ = godotenv.Load(c.String("env-file"))
}
plugin := Plugin{
Repo: Repo{
Owner: c.String("repo.owner"),