mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 09:17:49 +08:00
history: print urls after importing builds
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
fea7459880
commit
963b9ca30d
@ -23,7 +23,7 @@ type importOptions struct {
|
|||||||
file string
|
file string
|
||||||
}
|
}
|
||||||
|
|
||||||
func runImport(ctx context.Context, _ command.Cli, opts importOptions) error {
|
func runImport(ctx context.Context, dockerCli command.Cli, opts importOptions) error {
|
||||||
sock, err := desktop.BuildServerAddr()
|
sock, err := desktop.BuildServerAddr()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -78,8 +78,15 @@ func runImport(ctx context.Context, _ command.Cli, opts importOptions) error {
|
|||||||
return errors.New("no build records found in the bundle")
|
return errors.New("no build records found in the bundle")
|
||||||
}
|
}
|
||||||
|
|
||||||
url := desktop.BuildURL(fmt.Sprintf(".imported/_/%s", refs[0]))
|
for i, ref := range refs {
|
||||||
return browser.OpenURL(url)
|
url := desktop.BuildURL(fmt.Sprintf(".imported/_/%s", ref))
|
||||||
|
fmt.Fprintln(dockerCli.Err(), url)
|
||||||
|
if i == 0 {
|
||||||
|
err = browser.OpenURL(url)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func importCmd(dockerCli command.Cli, _ RootOptions) *cobra.Command {
|
func importCmd(dockerCli command.Cli, _ RootOptions) *cobra.Command {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user