Add save/load for client config
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2022-01-21 02:40:33 +01:00
parent d583db5450
commit ff8c6aca64
5 changed files with 80 additions and 2 deletions

View File

@@ -56,6 +56,10 @@ func ActionLogin(c *cli.Context) error {
errmsg := fmt.Sprintf("Error logging in: %s", err)
return cli.Exit(errmsg, 1)
}
if err := clnt.WriteConfig(); err != nil {
errMsg := fmt.Sprintf("Failed to write config: %s", err)
return cli.Exit(errMsg, 1)
}
// TODO: Store this somewhere, so we don't need to log in each time
fmt.Println("Successfully logged in.")