logo

utils

~/.local/bin tools and git-hooks git clone https://hacktivis.me/git/utils.git
commit: 48d7e4377fea72692d5a896cba7274377e58e2b3
parent 32fcdc0f256c69087302e254e575ab752914305f
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 24 Sep 2022 05:33:27 +0200

cmd/pwd: Always prefix error message with "pwd: "

Diffstat:

Mcmd/pwd.c2+-
Mtest-cmd/pwd2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmd/pwd.c b/cmd/pwd.c @@ -19,7 +19,7 @@ main(int argc, char *argv[]) if(getcwd(pwd, sizeof(pwd)) == NULL) { - perror("getcwd"); + perror("pwd: getcwd"); return 1; } else diff --git a/test-cmd/pwd b/test-cmd/pwd @@ -22,7 +22,7 @@ enoent_body() { rm -fr "$(atf_get_srcdir)/remove-me" || exit 1 - atf_check -s exit:1 -e 'inline:getcwd: No such file or directory\n' "$(atf_get_srcdir)/../cmd/pwd" + atf_check -s exit:1 -e 'inline:pwd: getcwd: No such file or directory\n' "$(atf_get_srcdir)/../cmd/pwd" } enoent_cleanup() { rm -fr "$(atf_get_srcdir)/remove-me"