forked from Plemya-x/ALR
refactor
This commit is contained in:
10
helper.go
10
helper.go
@ -71,19 +71,19 @@ func HelperCmd() *cli.Command {
|
||||
helper, ok := helpers.Helpers[c.Args().First()]
|
||||
if !ok {
|
||||
slog.Error(gotext.Get("No such helper command"), "name", c.Args().First())
|
||||
os.Exit(1)
|
||||
return cli.Exit(gotext.Get("No such helper command"), 1)
|
||||
}
|
||||
|
||||
wd, err := os.Getwd()
|
||||
if err != nil {
|
||||
slog.Error(gotext.Get("Error getting working directory"), "err", err)
|
||||
os.Exit(1)
|
||||
slog.Error(gotext.Get("Error getting working directory"))
|
||||
return cli.Exit(err, 1)
|
||||
}
|
||||
|
||||
info, err := distro.ParseOSRelease(ctx)
|
||||
if err != nil {
|
||||
slog.Error(gotext.Get("Error getting working directory"), "err", err)
|
||||
os.Exit(1)
|
||||
slog.Error(gotext.Get("Error parsing os-release file"))
|
||||
return cli.Exit(err, 1)
|
||||
}
|
||||
|
||||
hc := interp.HandlerContext{
|
||||
|
Reference in New Issue
Block a user