mirror of
https://github.com/foomo/posh-providers.git
synced 2025-10-16 12:35:41 +00:00
refactor: add context
This commit is contained in:
parent
e04a6fb384
commit
7394d50521
@ -175,5 +175,5 @@ func (c *Command) execute(ctx context.Context, r *readline.Readline) error {
|
||||
u.User = url.UserPassword(username, password)
|
||||
}
|
||||
|
||||
return browser.OpenURL(u)
|
||||
return browser.OpenURL(ctx, u)
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ func (c *Command) Help(ctx context.Context, r *readline.Readline) string {
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
func (c *Command) auth(ctx context.Context, r *readline.Readline) error {
|
||||
return browser.OpenRawURL(c.harbor.Config().AuthURL)
|
||||
return browser.OpenRawURL(ctx, c.harbor.Config().AuthURL)
|
||||
}
|
||||
|
||||
func (c *Command) docker(ctx context.Context, r *readline.Readline) error {
|
||||
@ -129,7 +129,7 @@ func (c *Command) docker(ctx context.Context, r *readline.Readline) error {
|
||||
pterm.Info.Println("username: " + username)
|
||||
pterm.Info.Println("please enter your CLI secret as password provided on your profile settings...")
|
||||
|
||||
_ = browser.OpenRawURL(c.harbor.Config().AuthURL)
|
||||
_ = browser.OpenRawURL(ctx, c.harbor.Config().AuthURL)
|
||||
|
||||
return shell.New(ctx, c.l, "docker", "login", c.harbor.Config().URL, "-u", username).
|
||||
Args(r.AdditionalArgs()...).
|
||||
|
||||
Loading…
Reference in New Issue
Block a user