logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git
commit: 9f2153ac1ec892e6ead3fdab069a35c60f3ae870
parent 41049d427e924f99cd0f2ff9f67baafafa78fd02
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri, 20 Sep 2024 04:54:57 +0200

cmd/which: unify error message formatting

Diffstat:

Mcmd/which.c6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cmd/which.c b/cmd/which.c @@ -20,7 +20,7 @@ main(int argc, char *argv[]) char *path = getenv("PATH"); if(path == NULL) { - fputs("which: Error: $PATH environment unset", stderr); + fputs("which: error: $PATH environment unset", stderr); return 1; } @@ -36,7 +36,7 @@ main(int argc, char *argv[]) opt_s = true; break; case '?': - fprintf(stderr, "which: Error: Unrecognised option: '-%c'\n", optopt); + fprintf(stderr, "which: error: Unrecognised option: '-%c'\n", optopt); return 1; default: abort(); @@ -57,7 +57,7 @@ main(int argc, char *argv[]) char *hay = strdup(path); if(hay == NULL) { - perror("which: Failed duplicating $PATH"); + perror("which: error: Failed duplicating $PATH"); return 1; }