Rework error messages
This commit reworks error messages for all commands and makes sure they pass liniting.
This commit is contained in:
parent
d22784e6f5
commit
c31c46ee44
40 changed files with 249 additions and 110 deletions
|
|
@ -32,15 +32,15 @@ func (shell) Description() wisski_distillery.Description {
|
|||
}
|
||||
}
|
||||
|
||||
var errShell = exit.Error{
|
||||
Message: "unable to start shell: %s",
|
||||
var errShellWissKI = exit.Error{
|
||||
Message: "unable to find WissKI",
|
||||
ExitCode: exit.ExitGeneric,
|
||||
}
|
||||
|
||||
func (sh shell) Run(context wisski_distillery.Context) error {
|
||||
instance, err := context.Environment.Instances().WissKI(context.Context, sh.Positionals.Slug)
|
||||
if err != nil {
|
||||
return err
|
||||
return errShellWissKI.Wrap(err)
|
||||
}
|
||||
|
||||
code := instance.Barrel().Shell(context.Context, context.IOStream, sh.Positionals.Args...)()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue