We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11ed4e6 commit b61029bCopy full SHA for b61029b
1 file changed
internal/brew/brew.go
@@ -302,7 +302,16 @@ func installFormulaWithError(pkg string) string {
302
cmd := exec.Command("brew", "install", pkg)
303
output, err := cmd.CombinedOutput()
304
if err != nil {
305
- return parseBrewError(string(output))
+ outputStr := string(output)
306
+ if strings.Contains(strings.ToLower(outputStr), "try again using") && strings.Contains(strings.ToLower(outputStr), "--cask") {
307
+ cmd2 := exec.Command("brew", "install", "--cask", pkg)
308
+ output2, err2 := cmd2.CombinedOutput()
309
+ if err2 != nil {
310
+ return parseBrewError(string(output2))
311
+ }
312
+ return ""
313
314
+ return parseBrewError(outputStr)
315
}
316
return ""
317
0 commit comments