capistrano / capistrano/sshkit

Feature: Don't display redundant error messages on execute failure

Open
#348 10 comments 1 reaction 0 assignees View on GitHub
new feature
Dominant language
Ruby
Stars
1.2k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

Showing the same error in three different ways seems redundant. Is it possible to collapse into one?

The second one looks most relevant.

```
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host 12.34.56.78: Exception while executing on host 12.34.56.78: logrotate -f /etc/logrotate.conf exit status: 1
logrotate -f /etc/logrotate.conf stdout: Nothing written
logrotate -f /etc/logrotate.conf stderr: error: error running non-shared postrotate script for /path/to/log1.log of '/path/to/log1.log
/path/to/log2.log
'

SSHKit::Runner::ExecuteError: Exception while executing on host 12.34.56.78: logrotate -f /etc/logrotate.conf exit status: 1
logrotate -f /etc/logrotate.conf stdout: Nothing written
logrotate -f /etc/logrotate.conf stderr: error: error running non-shared postrotate script for /path/to/log1.log of '/path/to/log1.log
/path/to/log2.log
'

SSHKit::Command::Failed: logrotate -f /etc/logrotate.conf exit status: 1
logrotate -f /etc/logrotate.conf stdout: Nothing written
logrotate -f /etc/logrotate.conf stderr: error: error running non-shared postrotate script for /path/to/log1.log of '/root/apps/eme/shared/log/staging.log
/path/to/log2.log
'
```

Background: It occurred when I run

``` ruby
execute 'logrotate -f /etc/logrotate.conf'
```

on a single server, where the `postrotate` script for logrotate exits with a failure status.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.