Skip to content

Commit

Permalink
Merge pull request #1111 from wakatime/develop
Browse files Browse the repository at this point in the history
Release v1.102.3
  • Loading branch information
alanhamlett authored Oct 25, 2024
2 parents 0c905e8 + 2044e98 commit 75e1749
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/gandarez/go-realpath v1.0.0
github.com/juju/mutex v0.0.0-20180619145857-d21b13acf4bf
github.com/kevinburke/ssh_config v1.2.1-0.20220605204831-a56e914e7283
github.com/matishsiao/goInfo v0.0.0-20210923090445-da2e3fa8d45f
github.com/matishsiao/goInfo v0.0.0-20240924010139-10388a85396f
github.com/mitchellh/go-homedir v1.1.0
github.com/pkg/sftp v1.13.6
github.com/sirupsen/logrus v1.9.3
Expand Down Expand Up @@ -54,5 +54,3 @@ require (
golang.org/x/sys v0.21.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/matishsiao/goInfo => github.com/wakatime/goInfo v0.1.0-wakatime.9
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ github.com/masterzen/azure-sdk-for-go v3.2.0-beta.0.20161014135628-ee4f0065d00c+
github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc=
github.com/masterzen/winrm v0.0.0-20161014151040-7a535cd943fc/go.mod h1:CfZSN7zwz5gJiFhZJz49Uzk7mEBHIceWmbFmYx7Hf7E=
github.com/masterzen/xmlpath v0.0.0-20140218185901-13f4951698ad/go.mod h1:A0zPC53iKKKcXYxr4ROjpQRQ5FgJXtelNdSmHHuq/tY=
github.com/matishsiao/goInfo v0.0.0-20240924010139-10388a85396f h1:XDrsC/9hdgiU9ecceSmYsS2E3fBtFiYc34dAMFgegnM=
github.com/matishsiao/goInfo v0.0.0-20240924010139-10388a85396f/go.mod h1:aEt7p9Rvh67BYApmZwNDPpgircTO2kgdmDUoF/1QmwA=
github.com/mattn/go-colorable v0.0.6/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-isatty v0.0.0-20160806122752-66b8e73f3f5c/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
Expand Down Expand Up @@ -268,8 +270,6 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/wakatime/goInfo v0.1.0-wakatime.9 h1:QkFBcdCcUwFb2CxacFdt4I4aVPcJRY7nXh0sq1gqu3o=
github.com/wakatime/goInfo v0.1.0-wakatime.9/go.mod h1:aEt7p9Rvh67BYApmZwNDPpgircTO2kgdmDUoF/1QmwA=
github.com/yookoala/realpath v1.0.0 h1:7OA9pj4FZd+oZDsyvXWQvjn5oBdcHRTV44PpdMSuImQ=
github.com/yookoala/realpath v1.0.0/go.mod h1:gJJMA9wuX7AcqLy1+ffPatSCySA1FQ2S8Ya9AIoYBpE=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/heartbeat.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func parseHeartbeatResponse(data []json.RawMessage) (heartbeat.Result, error) {
return heartbeat.Result{}, fmt.Errorf("failed to parse json status: %s", err)
}

if result.Status >= http.StatusBadRequest {
if result.Status < http.StatusOK || result.Status > 299 {
resultErrors, err := parseHeartbeatResponseError(data[0])
if err != nil {
return heartbeat.Result{}, fmt.Errorf("failed to parse result errors: %s", err)
Expand Down
3 changes: 1 addition & 2 deletions pkg/offline/offline.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,7 @@ func handleResults(filepath string, results []heartbeat.Result, hh []heartbeat.H
continue
}

if result.Status != http.StatusCreated &&
result.Status != http.StatusAccepted {
if result.Status < http.StatusOK || result.Status > 299 {
withInvalidStatus = append(withInvalidStatus, hh[n])
}
}
Expand Down

0 comments on commit 75e1749

Please sign in to comment.