Skip to content

Commit

Permalink
fix: use buffered channel for downloadComplete to prevent blocking (#…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Matt Cadorette authored Apr 25, 2024
1 parent ef808de commit 7ddbd38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/cmd/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit 7ddbd38

Please sign in to comment.