HomeFreeBSD

Make vipw error message less cryptic

Description

Make vipw error message less cryptic

Unable to find an editor, vipw would give this error:

env EDITOR=fnord vipw

vipw: pw_edit(): No such file or directory

vigr or crontab do better:

env EDITOR=fnord crontab -e

crontab: no crontab for root - using an empty one
crontab: fnord: No such file or directory
crontab: "fnord" exited with status 1

After this change, vipw behaves more like vigr or crontab:

env EDITOR=fnord vipw

vipw: fnord: No such file or directory
vipw: "fnord" exited with status 1

Reviewed by: rpokala, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25369

Details

Provenance
pstefAuthored on Jun 20 2020, 6:20 AM
Parents
rG39c64ed6d16d: libutil: remove extraneous ": " from error messages
Branches
Unknown
Tags
Unknown

Event Timeline