Browse Source

feat(cli): add more logging for failed install

bergquist 9 năm trước cách đây
mục cha
commit
a8c68e33db
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      pkg/cmd/grafana-cli/commands/install_command.go

+ 2 - 2
pkg/cmd/grafana-cli/commands/install_command.go

@@ -126,8 +126,8 @@ func downloadFile(pluginName, filePath, url string) (err error) {
 	defer func() {
 		if r := recover(); r != nil {
 			retryCount++
-			if retryCount == 1 {
-				log.Debug("\nFailed downloading. Will retry once.\n")
+			if retryCount < 3 {
+				fmt.Printf("\nFailed downloading. Will retry once.\n%v\n", r)
 				downloadFile(pluginName, filePath, url)
 			} else {
 				panic(r)