Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

---

## [x.y.z] - TBD

### Changed

- Suppress output messages for `step certificate needs-renewal` and `step ssh
needs-renewal` commands when certificates don't need renewal. Use the
`--verbose` flag to always show messages regardless of renewal status
(smallstep/cli#1548).

## [0.29.0] - 2025-12-02

### Added
Expand Down
10 changes: 8 additions & 2 deletions command/certificate/needsRenewal.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ $ step certificate needs-renewal ./certificate.crt --bundle
'''

Check if the leaf certificate provided by smallstep.com has passed 66 percent
of its vlaidity period:
of its validity period:
'''
$ step certificate needs-renewal https://smallstep.com
'''
Expand Down Expand Up @@ -234,5 +234,11 @@ func isVerboseExit(needsRenewal, isVerbose bool) error {
}
return nil
}
return errs.NewExitError(errors.Errorf("certificate does not need renewal"), 1)

if isVerbose {
return errs.NewExitError(errors.Errorf("certificate does not need renewal"), 1)
}

// urfave/cli won't show any message
return cli.NewExitError("", 1)
}
8 changes: 7 additions & 1 deletion command/ssh/needsRenewal.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,11 @@ func isVerboseExit(needsRenewal, isVerbose bool) error {
}
return nil
}
return errs.NewExitError(errors.Errorf("certificate does not need renewal"), 1)

if isVerbose {
return errs.NewExitError(errors.Errorf("certificate does not need renewal"), 1)
}

// urfave/cli won't show any message
return cli.NewExitError("", 1)
}