Skip to content

Commit

Permalink
added printouts to show dowloading plugin from URL
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Zheng <[email protected]>
  • Loading branch information
Two-Hearts committed Dec 21, 2023
1 parent a68d098 commit 49a3bcb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/notation/plugin/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ func install(command *cobra.Command, opts *pluginInstallOpts) error {
}
defer os.Remove(tmpFile.Name())
defer tmpFile.Close()
fmt.Printf("Downloading plugin from %s\n", opts.pluginSource)
err = notationplugin.DownloadPluginFromURL(ctx, opts.pluginSource, tmpFile)
if err != nil {
return fmt.Errorf("failed to download plugin from URL %s with error: %w", opts.pluginSource, err)
}
fmt.Printf("Download completed. Saved to tmp file %s.\n", tmpFile.Name())
if err := installPlugin(ctx, tmpFile.Name(), opts.inputChecksum, opts.force); err != nil {
return fmt.Errorf("plugin installation failed: %w", err)
}
Expand Down

0 comments on commit 49a3bcb

Please sign in to comment.