cli: factor out abort