()
| 120 | } |
| 121 | |
| 122 | func (e *DaemonError) Redact() string { |
| 123 | // Don't include e.stderr in redacted messages because it can contain |
| 124 | // things like paths and usernames. |
| 125 | if e.cmd != "" { |
| 126 | return fmt.Sprintf("command %s: %s", e.cmd, e.err) |
| 127 | } |
| 128 | return e.err.Error() |
| 129 | } |
| 130 | |
| 131 | // DaemonVersion returns the version of the currently running Nix daemon. |
| 132 | func DaemonVersion(ctx context.Context) (string, error) { |