mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 22:28:15 +00:00
Merge pull request #3630 from Infisical/daniel/agent-exit-code
fix(agent): exit code 1 on fetch secrets error
This commit is contained in:
@@ -884,6 +884,12 @@ func (tm *AgentManager) MonitorSecretChanges(secretTemplate Template, templateId
|
|||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Msgf("unable to process template because %v", err)
|
log.Error().Msgf("unable to process template because %v", err)
|
||||||
|
|
||||||
|
// case: if exit-after-auth is true, it should exit the agent once an error on secret fetching occurs with the appropriate exit code (1)
|
||||||
|
// previous behavior would exit after 25 sec with status code 0, even if this step errors
|
||||||
|
if tm.exitAfterAuth {
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (existingEtag != currentEtag) || firstRun {
|
if (existingEtag != currentEtag) || firstRun {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user