Skip to content

Commit

Permalink
Merge pull request #22 from camptocamp/catch-exit-code
Browse files Browse the repository at this point in the history
fix(exit-code): catch exit code
  • Loading branch information
Xaving authored Jul 12, 2024
2 parents fba6181 + 2aa9a7e commit 4907724
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ To enable it, run `git config --global diff.sops.textconv sops-git-diff-helper`
```
*.yaml diff=sops
```

## Contribute and test
In order to run test, the dev sops pgp key should be imported first, as explained [here](https://github.com/getsops/sops?tab=readme-ov-file#21test-with-the-dev-pgp-key).
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,9 @@ func main() {
fmt.Fprintf(os.Stderr, "[helm-sops] Error: %s\n", err)
}

if len(w.Errors) > 0 && w.ExitCode == 0 {
w.ExitCode = 10
}

os.Exit(w.ExitCode)
}

0 comments on commit 4907724

Please sign in to comment.