Maintenance: error wrapping of alpine package

This commit is contained in:
Quentin McGaw
2021-05-11 17:52:29 +00:00
parent e8c8742bae
commit 61e36d6aff
2 changed files with 23 additions and 9 deletions

View File

@@ -49,6 +49,7 @@ var (
var (
errSetupRouting = errors.New("cannot setup routing")
errCreateUser = errors.New("cannot create user")
)
func main() {
@@ -177,7 +178,7 @@ func _main(ctx context.Context, buildInfo models.BuildInformation,
const defaultUsername = "nonrootuser"
nonRootUsername, err := alpineConf.CreateUser(defaultUsername, puid)
if err != nil {
return err
return fmt.Errorf("%w: %s", errCreateUser, err)
}
if nonRootUsername != defaultUsername {
logger.Info("using existing username %s corresponding to user id %d", nonRootUsername, puid)