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
Reviewer
rpokala
Differential Revision
D25369: Make vipw error message less cryptic
Parents
rS362429: libutil: remove extraneous ": " from error messages
Branches
Unknown
Tags
Unknown