Skip to content
Merged
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ All notable changes to `src-cli` are documented in this file.

### Fixed

- Log files created by `src campaigns [preview|apply]` are deleted again after successful execution. This was a regression and is not new behaviour. If steps failed to execute or the `-keep-logs` flag is set the log files are not cleaned up.

## 3.21.0

### Added
Expand Down
5 changes: 5 additions & 0 deletions internal/campaigns/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ func (tl *TaskLogger) Close() error {
if tl.errored || tl.keep {
return nil
}

if err := os.Remove(tl.f.Name()); err != nil {
return errors.Wrapf(err, "cleaning up log file %s", tl.f.Name())
}

return nil
}

Expand Down