From 7ddbd389bc8134a50df4c23c75727aea57232db4 Mon Sep 17 00:00:00 2001 From: Matt Cadorette Date: Thu, 25 Apr 2024 14:22:59 -0400 Subject: [PATCH] fix: use buffered channel for downloadComplete to prevent blocking (#1617) 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 )