From 9fd25a7517a640873f7b35aadfd19f3c686d491f Mon Sep 17 00:00:00 2001 From: ipcrm Date: Thu, 25 Apr 2024 17:29:32 +0000 Subject: [PATCH] fix: use buffered channel for downloadComplete to prevent blocking Prior to this commit if an error occurred before the download progress function could start, the CLI would block writing to the downloadComplete channel --- cli/cmd/component.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/cmd/component.go b/cli/cmd/component.go index 22681fd59..de237a0d5 100644 --- a/cli/cmd/component.go +++ b/cli/cmd/component.go @@ -413,7 +413,7 @@ func runComponentsInstall(cmd *cobra.Command, args []string) (err error) { func installComponent(args []string) (err error) { var ( componentName string = args[0] - downloadComplete = make(chan int8) + downloadComplete = make(chan int8, 1) params map[string]interface{} = make(map[string]interface{}) start time.Time )