(err error)
| 45 | } |
| 46 | |
| 47 | func ErrorDockerPermissions(err error) error { |
| 48 | errStr := errors.Message(err) |
| 49 | |
| 50 | var groupAddStr string |
| 51 | if strings.HasPrefix(runtime.GOOS, "linux") { |
| 52 | groupAddStr = " (e.g. by running `sudo groupadd docker; sudo gpasswd -a $USER docker` and then restarting your terminal)" |
| 53 | } |
| 54 | |
| 55 | return errors.WithStack(&errors.Error{ |
| 56 | Kind: ErrDockerPermissions, |
| 57 | Message: errStr + "\n\nyou can re-run this command with `sudo`, or grant your current user access to docker" + groupAddStr, |
| 58 | }) |
| 59 | } |
| 60 | |
| 61 | func ErrorImageDoesntExistLocally(image string) error { |
| 62 | return errors.WithStack(&errors.Error{ |
no test coverage detected