Skip to content

Commit 72b4061

Browse files
committed
fix: exit code zero on 2XX, update aep-lib-go
previously, the exit code would return "2" only if the status code was 2xx, which is incorrect. The reverse behavior should be true (non-zero exit code on exception).
1 parent 34e4a4f commit 72b4061

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

cmd/aepcli/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func aepcli(args []string) (int, error) {
126126
output := ""
127127
if result != nil {
128128
output = result.Output
129-
if result.StatusCode != 0 && result.StatusCode/100 == 2 {
129+
if result.StatusCode != 0 && result.StatusCode/100 != 2 {
130130
returnCode = CODE_HTTP_ERROR_RESPONSE
131131
}
132132
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.22.3
44

55
require (
66
github.com/BurntSushi/toml v1.4.0
7-
github.com/aep-dev/aep-lib-go v0.0.0-20250506053130-6fd1d4e67239
7+
github.com/aep-dev/aep-lib-go v0.0.0-20250514123412-03de496bdecf
88
github.com/spf13/cobra v1.8.1
99
github.com/stretchr/testify v1.9.0
1010
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0=
22
github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
3-
github.com/aep-dev/aep-lib-go v0.0.0-20250506053130-6fd1d4e67239 h1:X9ylZ4HkzEpBny2vAE9zLDtTXpoe1BHeqhnIpsZZfaA=
4-
github.com/aep-dev/aep-lib-go v0.0.0-20250506053130-6fd1d4e67239/go.mod h1:YWfg3gjAGpvwFJnEQl1JjBGd0evGBKobt5wU/QxV6pA=
3+
github.com/aep-dev/aep-lib-go v0.0.0-20250514123412-03de496bdecf h1:fBHYtDAK2M/WAGG5cBHmewlW5XSdt9SaBASSb+KadT8=
4+
github.com/aep-dev/aep-lib-go v0.0.0-20250514123412-03de496bdecf/go.mod h1:YWfg3gjAGpvwFJnEQl1JjBGd0evGBKobt5wU/QxV6pA=
55
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
66
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
77
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

0 commit comments

Comments
 (0)