Skip to content

Commit 29a8cb4

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents cbf2590 + 0e02cef commit 29a8cb4

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
registry-url: "https://registry.npmjs.org"
2323
- uses: actions/setup-go@v5
2424
with:
25-
go-version: 1.22
25+
go-version: 1.23
2626

2727
- uses: goreleaser/goreleaser-action@v6
2828
with:

cmd_generate.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package yaakcli
22

33
import (
4+
"fmt"
45
"os"
56
"os/exec"
67

@@ -19,7 +20,7 @@ var generateCmd = &cobra.Command{
1920
CheckError(err)
2021

2122
if fileExists(pluginDir) {
22-
returnError("")
23+
CheckError(fmt.Errorf("plugin directory %s already exists", pluginDir))
2324
}
2425

2526
pterm.Println("Generating plugin to:", pterm.Magenta(pluginDir))
@@ -52,7 +53,3 @@ func runCmd(dir, cmd string, args ...string) {
5253
CheckError(c.Start())
5354
CheckError(c.Wait())
5455
}
55-
56-
func returnError(msg string) {
57-
pterm.Println(pterm.Red(msg))
58-
}

errors.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ package yaakcli
22

33
import (
44
"fmt"
5-
"github.com/pterm/pterm"
65
"os"
6+
7+
"github.com/pterm/pterm"
78
)
89

910
func CheckError(err error) {

0 commit comments

Comments
 (0)